Facebook Graph API和通用访问令牌

0 facebook facebook-graph-api oauth-2.0

如果我理解正确,Graph API允许使用通用访问令牌访问公共页面.然而,我发现当使用这种类型的令牌与用户令牌时,搜索结果中不会返回许多公共页面.我不希望用户只需要通过OAUTH对话框来检索公共页面的基本属性.

以下示例在使用任何用户访问令牌时返回结果,但在使用通用访问令牌时没有结果:

我在做什么或理解不正确?

https://graph.facebook.com/search?q=OSullivansHerndon&type=page&access_token={myuseraccesstoken}

https://graph.facebook.com/search?q=OSullivansHerndon&type=page&access_token={APPID|APP SECRET}

Cha*_*yan 10

您可以获得应用程序的通用访问令牌,该令牌可以让您查看在access_token=Graph调用中需要参数的请求.您无需对用户进行身份验证,因为访问令牌适用于应用程序.

https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&
client_secret=YOUR_APP_SECRET&
grant_type=client_credentials
Run Code Online (Sandbox Code Playgroud)

例:

https://graph.facebook.com/nike/posts?access_token={response from above call}
Run Code Online (Sandbox Code Playgroud)