3

I've developed a Facebookapp that has the "user_photos" permission. Now i've submitted the App, which is now live. I've installed it on several Facebook-Accounts of my friends... (Yes! they have granted the requested permissions)

When i now try to make an request i get the following error message

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

Here's my Request-Query: https://graph.facebook.com/LogInIDOfMyFriendThatHasInstalledTheAPP/?fields=albums.fields(photos,name,description),email&access_token=mySecretAppToken

Ok it works if I replace the App-Token with a User-Token that is generated by an OAuth-Process or via GraphAPIExplorer but in the Documentation (https://developers.facebook.com/docs/facebook-login/access-tokens/) it is said (in Paragraph) "App Tokens" that "App access tokens are used to make requests to Facebook APIs on behalf of an app rather than a user. [...]" and that i have to generate an other "App Accesstoken" but this also does't work.

I'm confused...

So is there something i've forgotten / missunderstood or do I have to use the oAuth-Way which means that my friends have to reauthenticate to my App every two month???

Thanks a lot!

Best regards Mike

4

1 回答 1

0

在它声明的文档中的几行之后

应用程序访问令牌还可用于代表已授予您应用程序发布权限的人员向 Facebook 发布内容。

这就是他们代表用户提出请求的意思。

对于相册端点,您需要一个用户访问令牌。

是的,如果您延长短期用户访问令牌,您的朋友需要每两个月重新验证一次您的应用程序。关键是当用户可能忘记了应用程序时,不要让应用程序坐在那里访问它们。提示用户重新进行身份验证可确保他们仍然知道这些应用程序,并且可以选择保留或删除它们

于 2013-05-27T16:05:09.660 回答