0

I'm trying to build a website with the following requirements. I need help to see if it's possible at all. This website has a regular login (not Facebook). Upon being logged in, the user has the option to "attach" his facebook account. At this point I save the return user id in the DB. Then, I tried on another computer the following Facebook Graph API call with this user id but it said:

Fatal error: Uncaught GraphMethodException: You can only access the "home" connection for the current user. thrown in /home/public/vendor/facebook/php-sdk/src/base_facebook.php on line 1294

The call:

/{user-id}/home

Appreciate help.

4

2 回答 2

0

试试 {user-id}/feed。如果您没有使用 facebook API 在“附加”时间生成的 accessToken,您将只能获取公共提要/数据。使用在“附加”时生成的访问令牌,您将能够获取您的应用权限的数据。

于 2014-05-10T05:31:49.267 回答
0

根据您尝试调用/{user-id}/home但使用来自不同用户的访问令牌的错误消息 -

您无法使用他们的访问令牌获取其他用户的新闻提要,只能获取您应用的当前用户

于 2014-05-09T17:55:42.680 回答