[英]vs2008 c#: Facebook.rest.api how to use it to get friends list?
How to make further progress from here? 如何从这里取得进一步的进展? What would be next step to get friends list?
下一步要获得朋友名单吗?
string APIKey = ConfigurationManager.AppSettings["API_Key"];
string APISecret = ConfigurationManager.AppSettings["API_Secret"];
Facebook.Session.ConnectSession connectsession = new Facebook.Session.ConnectSession(APIKey, APISecret);
Facebook.Rest.Api api = new Facebook.Rest.Api(connectsession);
You're really close. 你真的很亲近 All that is left to do is call the GetLists method in the Friends namespace.
剩下要做的就是在Friends命名空间中调用GetLists方法。
var friends = api.Friends.GetLists();
foreach (var friend in friends)
{
System.Console.WriteLine(friend.name);
}
Here's the link to the REST api docs . 这是REST api文档的链接 。 It should help you find other functions.
它应该可以帮助您找到其他功能。 Another way is to just use visual studios IntelliSense.
另一种方法是只使用视觉工作室的IntelliSense。 Type api.
输入api。 and visual studios should give you a list you can navigate through.
视觉工作室应该给您列出您可以浏览的清单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.