Even with a valid access_token with right set of permissions, FacebookClient does not get ALL of the photos for given album id

二次信任 提交于 2019-12-08 08:39:39

问题


Using Facebook Graph API, I am trying to get ALL of the photos from a given album ID. I tried finding it on Facebook Graph Reference site, but couldn't find any help. So here it is what I am doing.

I have a valid access token with permission of user_photos and friend_photos. I already verified that facebook debugger site. I already have the album id. And following is my URL that I am passing:

https://graph.facebook.com/<albumId>/photos?access_token=<my-valid-access-token>

I do get 4 photos, but I have 29 photos in total. Also, I don't see any cursor for "prev" or "next". So, now, I am lost. Don't know what I am missing here. Any help is appreciated. I am using Facebook SDK for .NET.


回答1:


So, here is the solution that worked for me: For facebook options, I already had "user_photos" and "friend_photos" as part of the scope. "friend_photos" is not really relevant here. I had to ADD "user_checkins" to the scope collection to get all of the photos that I had in my given album. So here it is that I am using now, and getting things working for me. Graph API Explorer was super helpful for me when I was investigatiing this.

var facebookOptions = new Microsoft.Owin.Security.Facebook.FacebookAuthenticationOptions{...};
facebookOptions.Scope.Add("email");
facebookOptions.Scope.Add("user_about_me");
facebookOptions.Scope.Add("user_events");
facebookOptions.Scope.Add("user_groups");
facebookOptions.Scope.Add("user_likes");
facebookOptions.Scope.Add("user_photos");
facebookOptions.Scope.Add("user_videos");
facebookOptions.Scope.Add("user_checkins");
facebookOptions.Scope.Add("user_friends");
facebookOptions.Scope.Add("user_location");
facebookOptions.Scope.Add("user_photo_video_tags");
facebookOptions.Scope.Add("user_actions.music");
facebookOptions.Scope.Add("user_activities");
app.UseFacebookAuthentication(facebookOptions);


来源:https://stackoverflow.com/questions/22827638/even-with-a-valid-access-token-with-right-set-of-permissions-facebookclient-doe

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