I\'ve seen a lot of documentation about integration between ASP .NET web sites and Facebook, but I haven\'t found a simple working example, even using Facebook C# SDK.
as you say using Facebook C# SDK, then here is path and some code for canvas application:
1- Create your web application from visual studio
2- install nuget and get by nuget Facebook C# SDK
3- from https://developers.facebook.com/apps/ create and configure your app.
4- Your web config for facebook integration :
...
By using sdk, you can parse signed request or cookie written by facebook js sdk
FacebookWebContext fbWebContext = new FacebookWebContext();
//Check if user auhtenticated
bool IsAuthenticated = fbWebContext.IsAuthenticated();
Here you can have friend count by:
FacebookWebClient fbWebClient = new FacebookWebClient();
dynamic result = fbWebClient.Get("me/friends");
var friends = result["data"];
int frienCount = friends.Count;
For the client side: