FQL to get Online Friends return zero
I am trying to get Online Friends by using following code.
protected void GetActiveFriends()
{
var fb = new FacebookWebClient();
dynamic myInfo = fb.Get("me");
var uId = myInfo.id;
dynamic friends = fb.Query("SELECT uid,开发者_如何转开发 name, pic_small, online_presence FROM user WHERE online_presence IN ('active', 'idle') AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())");
Response.Write(friends.Count);
foreach (dynamic friend in friends)
{
Response.Write(friend.id);
}
}
friends.Count returns Zero & none of the friend.id gets displayed.
I guess my query is right then what's the problem.
Never mind got it. Had not added extra permissions.
精彩评论