How can i get my friends using my facebook App with graph api asp.net

拟墨画扇 提交于 2019-12-25 03:45:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!