I am using Facebook C# SDK and it's working pretty well. I want to show user's albums and it's photos on my site. I am using graph api. I did get the albums using this method :-
fb.GetAsync("me/albums/photos", (val) =>
{
if (val.Error == null)
{
IDictionary<string, object> dict = val.Result as IDictionary<string, object>;
}
else
{
// TODO: Need to let the user know there was an error
//failedLogin();
}
});
How do I get the photos present in each of these albums?
An album is a graph object so once you have its id you can retrieve it like so:
http://graph.facebook.com/{albumid}/photos?access_token={token}
You can also use dynamics with the SDK (if you are using .Net 4) which eliminates the need to cast to <IDictionary>
in the callback and makes for much cleaner code when diving through the graph objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With