Getting App Photos with Facebook C# SDK
Using the Facebook C# SDK on Windows Phone 7, my mobile application can successfully upload apps to a user's photo album with a post to me/photos. Those photos do not show up when I query the application's photos collection via the graph API using applicationId/photos query. Any suggestions? What permissions are necessary for this? I am getting back an empty data set.
In the following code sample, accesstoken is the access token and 112233445666 is my Facebook application Id.
var client = new FacebookClient("accesstoken");
client.GetAsync("11223344开发者_C百科5666/photos", new Facebook.FacebookAsyncCallback(delegate(Facebook.FacebookAsyncResult asyncResult)
{
var result = asyncResult.Result as JsonObject;
System.Diagnostics.Debug.WriteLine("Application Photos: {0}", result);
}));
It sounds like you are uploading pictures to the user's photo gallery, but you are querying the application's photos? there is a difference. You want to query something like
https://graph.facebook.com/{USERID}/albums
It wouldn't make sense that you are writing an app that stores EVERYONE's photos in the application's image gallery or is that what you are doing?
精彩评论