问题
Hi i'm using Facebook C# SDK i can get my friends like;
JsonObject friends = (JsonObject)facebook.Api("me/friends?");
But i couldn't get my friends which uses my application how can i get them?
Any idea?
Thanks,
回答1:
this is a bit confusing statement
But i couldn't get my friends which uses my application how can i get them?
Well i have been through situation like this.I made an application and called upon my friends to see that on my login it was working very well but on my friends login they were unable to get their groups. then after doing some research i came to conclusion that i have to move to v5.0 which addresses authentication problems. considering all the authentication is done properly and you still do not get the required data.
you should switch to 5.0
it worked for me
回答2:
I searched and found the code below;
string query = "SELECT uid FROM user WHERE has_added_app=1 and uid IN (SELECT uid2 FROM friend WHERE uid1 =" + su.FbId + ")";
JsonArray friendsArray = (JsonArray)facebook.Query(query);
And it worked, I think we can't use graph api, only fql is allowed in that situation.
来源:https://stackoverflow.com/questions/5018472/how-can-i-get-my-friends-using-my-facebook-app-with-graph-api-asp-net