Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

C#
string token = Request["token"];
 var client = new FacebookClient(token);
 dynamic me = client.Get("me");
 string name=me.name;
string email=me.email; 


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
Posted

1 solution

Check with client.Get("/me/friends")
XML
dynamic myInfo = client.Get("/me/friends");
                     if (myInfo != null)
                     {
                         foreach (dynamic friend in myInfo.data)
                         {
                             //increment count
                         }
                     }

Use client.Get("/me/likes"); for likes.

http://www.chrislord.me/blog/facebook-connect-graph-api-and-aspnet-c/[^]
 
Share this answer
 
v5
Comments
Syed Salman Raza Zaidi 12-Nov-11 2:56am    
Thanks, from this i got Friends list now i want total friends who liked my sample app of FB :)
Prerak Patel 12-Nov-11 3:03am    
You can use me/likes for that. Mark answer if this helped.
Syed Salman Raza Zaidi 12-Nov-11 3:29am    
Thanks,but i'm still not getting likes me/likes resturning an empty array and i have 2 friends who liked my app
Prerak Patel 12-Nov-11 3:39am    
Could be /me/likes

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900