My app’s only purpose is to make posts as Facebook pages, so we’d like to take user login out of the flow.
If the user adds our app to their page using a link like http://facebook.com/add.php?api_key=APP_KEY&pages=1, how would I get an access token to make posts as that page?
Thanks 🙂
At least one of the page’s admins has to authorize your app with both
manage_pagesandpublish_streampermissions. (see https://developers.facebook.com/docs/reference/api/permissions/)Then once you get their access token, call the graph with
me/accountsand in that list will be the page. (see the Page Login section of https://developers.facebook.com/docs/authentication/) In there will be a page access token for managing that page. So then you can HTTP Post to me/feed a new message using that page access token.Happy coding!