Get all public albums of a Facebook user profile - iOS Facebook SDK

我们两清 提交于 2020-01-06 08:11:32

问题


Is there a way to get all public albums of a user profile in Facebook? For example if I use my app *access_token* in a URL like this:

https://graph.facebook.com/USER_ID/albums?access_token=MY_APP_ACCESS_TOKEN

I get this error:

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

Why? Is it the right syntax?

After solving that, How can I do it in Objective-C? Thank you in advance


回答1:


Even if you want to get the public albums of a user, you need to ask the user to grant the correct permission and login with your application. user_photos is required to see the current user's photos, and friends_photos is required to see the user's friends' photos.




回答2:


Had encountered this issue recently. Edit the permission of app in Facebook developers website. Adding user_photos in User & Friend permissions fixed my problem.



来源:https://stackoverflow.com/questions/10842617/get-all-public-albums-of-a-facebook-user-profile-ios-facebook-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!