How to post to a Facebook Page (how to get page access token + user access token)

主宰稳场 提交于 2019-12-03 17:19:33
  1. You can ask the page admin for manage_pages along with offline_access. I do this in my production app to be able to post scheduled postings onto the pages' walls.

  2. Nope. Not possible. That's what asking permissions is all about. And why not everyone gets to administer everyone else's pages. Could you image if you could administer anyone's page without them granting you access?!?

  3. To post to the page as the page, you need a page access token. To post to page's wall as a user, you need a user access token.

  4. Yes, please see: https://developers.facebook.com/docs/reference/api/permissions and https://developers.facebook.com/docs/authentication/

If you have further questions about any one of these, please start a new question. It's not really fair to users of stackoverflow to be hit with 4 questions in one and then to be asked followup questions to each of those.

Invincible

I have done in Django:

Step to get Page_access_token:

facebook_page_id=360729583957969  
graph = GraphAPI(request.facebook.user.oauth_token.token)                     
page_access_token=graph.get(facebook_page_id+'?fields=access_token')  

This way you can get Page access token.

You can check this thing on Fb GraphAPIexplorer:

http://developers.facebook.com/tools/explorer  
GET URL: fb_page_id?fields=access_token   

for example: 360729583957969?fields=access_token that will give you page_access_token

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!