查找使用Linq to Twitter的用户的所有关注者? [英] Find all followers for a user using Linq to Twitter?
问题描述
我如何找到使用Linq2Twitter的Twitter用户的所有关注者?
How can I find all the followers a Twitter user has using Linq2Twitter?
我在文档中可以找到的只是对.Following属性的引用,而不是对.Followers属性的引用.
All I can find in the documentation is a reference to the .Following property, not the .Followers property.
var result = from search in context.List
where search.Following //etc
如果提供Twitter用户名,如何找到Twitter用户的关注者?
How can I find the followers a Twitter user has if I provide the twitter username?
twitter.com/foobar // 'foobar' is the username.
推荐答案
LINQ to Twitter允许您在社交图上查询朋友和关注者.这是一个如何获得关注者的示例:
LINQ to Twitter lets you query the social graph for friends and followers. Here's an example of how to get followers:
var followers =
(from follower in twitterCtx.SocialGraph
where follower.Type == SocialGraphType.Followers &&
follower.ID == "15411837"
select follower)
.SingleOrDefault();
followers.IDs.ForEach(id => Console.WriteLine("Follower ID: " + id));
这将返回ID.这是完整的文档: http://linqtotwitter.codeplex. com/wikipage?title = Listing%20Followers& referringTitle = Listing%20Social%20Graphs .
That will return IDs. Here's the full documentation: http://linqtotwitter.codeplex.com/wikipage?title=Listing%20Followers&referringTitle=Listing%20Social%20Graphs.
乔
这篇关于查找使用Linq to Twitter的用户的所有关注者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!