0
我已經得到了下列(工作)代碼,它返回所有我(當前用戶)朋友的列表。 我現在想獲得他們的公開個人資料照片。這是如何完成的?(Facebook的C#SDK)獲取朋友個人資料圖片
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
這是做這件事:
–
Nicke
2011-03-13 15:54:17