Can we grant access to an app to post something on a page in facebook?

703 Views Asked by At

The scenario is I want to post some details on a facebook page created by me from my other app. So want to know how can we give access to app through access token means how can we get the access token for this?

Thank You Regards

2

There are 2 best solutions below

1
On BEST ANSWER

You can get the access_token for you page by enabling the manage_pages permission, and then calling the API endpoint: /me/accounts to get the access_token for all the pages you manage.

You can then use this access token to post to your page using the Graph API call: /{page_id}/feed

1
On

Yes, take a look at the following URL and the "Page Access Tokens" section for information on how to do obtain a token.

API - Obtain Page Token

Note, however, that there is a known issue when trying to use the links api point, if you intend to define your own link in the post.

Bug report

You'll probably want to use the feed API point instead. I've not actually managed to get this working yet though, and I'm awaiting feedback from FB themselves. I'll update you if/when I hear something useful back.

Good luck.