真的是初学者的问题。
据我了解,以下代码查询 facebook 朋友。如何获取我所有朋友的名字和姓氏作为字符串,以便将其放入列表框中?
谢谢
private async void FqlAsyncExample()
{
try
{
// query to get all the friends
var query = string.Format("SELECT uid,pic_square,first_name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1={0})", "me()");
dynamic parameters = new ExpandoObject();
parameters.q = query;
dynamic result = await _fb.GetTaskAsync("fql", parameters);
TotalFriends.Text = string.Format("You have {0} friend(s).", result.data.Count);
}
catch (FacebookApiException ex)
{
// handle error message
}
}