Facebook page access token with “Reading Permission” only [duplicate]

痞子三分冷 提交于 2019-12-14 04:21:48

问题


I want to show the one latest shared post of my Facebook page in a website (text description + date of posting). I'm using Javascript (client-side only, PHP is not allowed because the website is not hosted in an Apache server). For that I need an Access Token with Manage Pages permission (correct me if I'm wrong please).

According to my researches, getting a token that doesn't expire in one month and that have Manage Pages permission (the only permission that grant reading a page feeds), require the creation of a Facebook app that include "Facebook login" and then waiting for the "Review Process" approval.

I don't have any intention to make people login since it's a static website. Is there a possibility to get a static access token that doesn't expire in an hour and that have the permission of "reading page's feed", without creating the app, adding a privacy policy page URL for it, waiting for the review process, and making people login?


回答1:


Make A facebook App, get its access_token and then use this

https://graph.facebook.com/v2.5/{page-id}/feed?format=json&access_token={access_token}

or you can also use user access_token as well to read only. No need to make app in this scenario.

It will return in response

"data": [
  {
     "message": "Test",
     "created_time": "2015-09-28T10:36:09+0000",
     "id": "1631034803844937_1634777900137294"
  },
  {
     "message": "Testing Testing .. !! Helloo",
     "created_time": "2015-09-16T11:06:18+0000",
     "id": "1631034803844937_1631042857177465"
  }
],


来源:https://stackoverflow.com/questions/33039313/facebook-page-access-token-with-reading-permission-only

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