我有以下(工作)代码,它返回我所有(当前用户)朋友的列表。 我现在也希望得到他们的公开个人资料照片。怎么做的?
var authorizer = new Authorizer();
if (authorizer.IsAuthorized())
{
if (authorizer.Session != null)
{
var token = authorizer.Session.AccessToken;
if (!string.IsNullOrEmpty(token))
{
var client = new FacebookClient(token);
dynamic me = client.Get("me");
string firstName = me.first_name;
string lastName = me.last_name;
dynamic myInfo = client.Get("/me/friends");
if (myInfo != null)
{
foreach (dynamic friend in myInfo.data)
{
Response.Write("Name: " + friend.name + "<br/>Facebook id: " + friend.id + "<br/><br/>");
}
}
}
}
}
// Nicke