FaceBook C#SDK帮助 [英] FaceBook C# SDK Help
问题描述
我正在使用Codeplex的C#SDK开发Facebook登录应用程序
我已经在Facebook上制作了一个示例FB应用程序
每件事都相应地起作用,但仅剩2件事
1:如何获得好友总数
2:如何获得朋友对我的应用程序的喜欢?
我已经将权限设置为user_friends和friends_likes,但是我无法访问朋友列表或点赞
我已经访问了这样的用户名和姓氏
I''m developing a facebook login app using codeplex''s C# sdk
I have make a sample FB application on facebook
Every thing is working accordingly but just 2 things remaining
1: How to get Total no of friends
2: How to get total friends likes of my application?
I''ve set perms to user_friends and friends_likes but i''m unable to access friend list or likes
I''ve accessed the username and firstname lastname like this
string token = Request["token"];
var client = new FacebookClient(token);
dynamic me = client.Get("me");
string name=me.name;
string email=me.email;
但没有像friends,friends_likes甚至likes
这样的财产
有人可以为我提供检索以上两者的示例吗?
关于
but there is no property like friends or friends_likes or even likes
Can some one provide me the example to retrieve the above both
Regards
推荐答案
使用client.Get("/me/friends")
进行检查
Check withclient.Get("/me/friends")
dynamic myInfo = client.Get("/me/friends");
if (myInfo != null)
{
foreach (dynamic friend in myInfo.data)
{
//increment count
}
}
使用client.Get("/me/likes");
表示喜欢.
http://www.chrislord.me/blog/facebook-connect-graph -api-and-aspnet-c/ [
Use client.Get("/me/likes");
for likes.
http://www.chrislord.me/blog/facebook-connect-graph-api-and-aspnet-c/[^]
这篇关于FaceBook C#SDK帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!