views:

20

answers:

1

Hi all, I have this problem: I need too let user logged on my site to publish content(link, image, post, notes) on page of Facebook where they are admin. I've read some docs on Facebook developer section but I'm a little confused. I need to register an app with which I can give the opportunity to connect and publish. To let the user publish I show them the login popup but after they're logged I'm in trouble. What is the best way to let them publish on their page? Thanks Ale

A: 

Once you have an access token for the user you will just need to do a POST request to the Graph API. You can read the documentation here: http://developers.facebook.com/docs/reference/api/post

The example from that page shows how to do it with php.

curl -F 'access_token=...' \
     -F 'message=Check out this funny article' \
     -F 'link=http://www.example.com/article.html' \
     -F 'picture=http://www.example.com/article-thumbnail.jpg' \
     -F 'name=Article Title' \
     -F 'caption=Caption for the link' \
     -F 'description=Longer description of the link' \
     -F 'actions={"name": "View on Zombo", "link": "http://www.zombo.com"} \
     -F 'privacy={"value": "ALL_FRIENDS"} \
     https://graph.facebook.com/me/feed

You don't need to use PHP. You can use any web client or Facebook library such as the Facebook C# SDK.

Nathan Totten

related questions