Auto Facebook OAuth from ASP.NET C#

别来无恙 提交于 2019-11-29 18:16:21

What you need to get is an access token. This is a key which allows you continued access to the account until your the token expires or the user cancels it.

When you first authenticate if you have set the required permissions you get an authtoken which you can store and use to initiale further calls.

var client = new FacebookClient("my_access_token");
dynamic result = client.Get("19292868552_118464504835613");
string id = result.id;
string fromName = result.from.name;
string fromCategory = result.from.category;
string message = result.message;
int likes = result.likes;
foreach (dynamic comment in result.comments.data) {
    string commentId = comment.id;
    string commentMessage = comment.message;
}

see this article for details about the process:

http://benbiddington.wordpress.com/2010/04/23/facebook-graph-api-getting-access-tokens/

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