facebook - 如何通过 Graph API 获取随机 Facebook 页面的状态

标签 facebook graph

我正在尝试获取 Facebook 页面的状态。为此,我需要一个访问 token ,我可以通过以下方式获取该 token :

https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
grant_type=client_credentials  

( Found here )

但是当我尝试使用访问 token 手动访问图形 api 时,如下所示:https://graph.facebook.com/id_of_page/statuses?access_token=my_fresh_access_token ,我总是收到此错误:

{
  "error": {
  "message": "A user access token is required to request this resource.",
  "type": "OAuthException",
  "code": 102
}
}

是否有不同“种类”的访问 token ?或者我做错了什么?

最佳答案

Facebook 上有多种访问 token 。 您收到的访问 token 是应用程序访问 token ,它比用户访问 token 更受限制。

可用的访问 token 在“访问 token 术语”下进行了解释:https://developers.facebook.com/docs/authentication/permissions/

关于facebook - 如何通过 Graph API 获取随机 Facebook 页面的状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10450732/

相关文章:

javascript - 使用 Facebook ://To Share a Post through the Facebook App with Web Interface

ios - Facebook SDK 使用 Swift 3 iOS 10 登录

c# - 如何在 ASP.NET MVC3 中创建图形?

graph - 为什么 DAG 的拓扑排序具有 O(V+E) 而不仅仅是 O(V) 的时间复杂度?

php - 目标 [League\OAuth2\Server\Repositories\ClientRepositoryInterface] 在构建 [League\OAuth2\Server\AuthorizationServer] 时不可实例化

ruby-on-rails - 无用户认证 (Facebook)

android - Facebook 中的用户好友权限

r - R 中多种图形类型的对齐(最好在 ggplot2 或 lattice 中)

java - Gremlin 获取所有传入和传出的顶点,包括它们的边和方向

css - SVG 文本在较大的标签上消失