具有“阅读许可"的Facebook页面访问令牌;只要 [英] Facebook page access token with "Reading Permission" only

本文介绍了具有“阅读许可"的Facebook页面访问令牌;只要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网站上显示我的Facebook页面的最新共享帖子(文字说明+发布日期).我正在使用Javascript(仅客户端,不允许使用PHP,因为该网站未托管在Apache服务器中).为此,我需要具有Manage Pages权限的访问令牌(如果我输入错了,请纠正我).

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).

根据我的研究,要获得一个令牌,该令牌在一个月内不会过期,并且具有Manage Pages权限(授予读取页面供稿的唯一权限),因此需要创建一个包含"Facebook登录名"的Facebook应用",然后等待审核过程"批准.

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?

推荐答案

制作一个Facebook应用,获取其access_token,然后使用此

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}

,或者您也可以使用用户access_token进行只读.在这种情况下,无需制作应用.

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

它将返回作为响应

"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"
  }
],

这篇关于具有“阅读许可"的Facebook页面访问令牌;只要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆