-1

我想构建一个应用程序,关注特定 Facebook 粉丝页面的用户(那些喜欢粉丝页面的用户)可以评论粉丝页面上的帖子。当我使用粉丝页面的管理员用户的访问令牌来检索帖子时,我没有收到任何错误,但是当我使用非管理员用户(至少是喜欢该页面的人)时,我得到了错误:

Fatal error:  Uncaught OAuthException: An active access token must be used to query information about the current user.

我将每个用户的详细信息存储在数据库中,包括他们登录时的访问令牌并接受必要的权限,例如publish_stream、read_stream、offline_access、manage_pages

我的问题是,我是否可以使用其他用户的访问令牌检索帖子,因为似乎只有管理员用户的访问令牌才允许我检索帖子?

4

1 回答 1

0

For reading the feed of a page, you only need an app access token:

$app_accesstoken = APP-ID . '|' . APP-SECRET;

See here: https://developers.facebook.com/docs/reference/api/page/

"an app or user access token for public and non-demographically restricted pages"

Btw, "offline_access" is deprecated since months and will be deactivated soon.

于 2012-11-22T10:36:36.440 回答