Facebook C# SDK Get Current User
I m working on a Facebook App. Not a website.
I am trying to use Facebook C# SDK and trying to get Current User and Query Current User info. How do i do that?
Also, When i try to use an app it s asking for Adding the app, requesting permission to access data, how do i do that also?
Is there a comprehensive examples of these things?
如果你坚持使用.NET 3.5,这将工作:
var facebookClient = new FacebookClient(FacebookAccessToken);
var me = facebookClient.Get("me") as JsonObject;
var uid = me["id"];
You need the access token. Once you get the access token make a request to me
var fb = new FacebookClient("access_token");
dynamic result = fb.Get("me", new [] { fields = "id" });
var userId = result.id;
链接地址: http://www.djcxy.com/p/76516.html
上一篇: 从桌面应用程序获取Twitter,Facebook和Gmail的URL
下一篇: Facebook C#SDK获取当前用户