0

Possible Duplicate:
Facebook Graph Api - Posting to Fan Page as an Admin

I made website where I basically get news feeds from my fan page. And now I'm trying to do opposite. Is there a way to update own facebook fan page from my website ? I know that there is a way to upload statuses etc to facebook profile but can I do the same with my facebook fan page? If yes I would appreciate someone to put me on right track.

Community
  • 1
  • 1
Tomasz Golinski
  • 743
  • 5
  • 25
  • 1
    yes you can http://stackoverflow.com/questions/3627684/facebook-graph-api-posting-to-fan-page-as-an-admin – Rufinus Jul 29 '11 at 13:08

1 Answers1

3

If you want to post AS your Facebook Page, then you first need a user access token with the manage_pages permission, for a user who is an admin of that page.

Make a request to https://graph.facebook.com/me/accounts - this will return a list of the pages which you are an admin of, and an access token for each. The access_token field is only returned if you have the manage_pages permission.

Try this with the Graph Explorer here: https://developers.facebook.com/tools/explorer/?method=GET&path=me/accounts - you will need to hit 'Get Access Token' and grant the extended permission 'manage_pages'.

You now need to use the access token returned for the page you want to post as, and make a POST to https://graph.facebook.com/me/feed - in this call 'me' is the page, as you are using a page access_token.

Here are the available fields for the Post object: https://developers.facebook.com/docs/reference/api/post/