如何找到所有推特用户使用Linq2Twitter的追随者?
在文档中,我所能找到的只是提到.后继财产,而不是.后继财产。
var result = from search in context.List
where search.Following //etc
如果我提供推特用户名, 我如何能找到推特用户的追随者?
twitter.com/foobar // foobar is the username.
如何找到所有推特用户使用Linq2Twitter的追随者?
在文档中,我所能找到的只是提到.后继财产,而不是.后继财产。
var result = from search in context.List
where search.Following //etc
如果我提供推特用户名, 我如何能找到推特用户的追随者?
twitter.com/foobar // foobar is the username.
LINQ to Twitter 允许您为朋友和追随者查询社交图。 这里的一个例子是如何获得追随者 :
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 。 这里的完整文件 : < a href="http://linqto twitter.codplex.com/wikipage? title=Listing% 20 Conferences& rerefertingTitle=Listing% 20 Social% 20Graphs" rel=“nofollow” >http://linqto twitter.codeplex.com/wikipage? title=Listing% 20 Conferenceers& refertingTitle=Listing% 20Social%20Graphs 。
乔
Twitter API 正在获取< a href=> "https://dev. twitter.com/docs/api/1/get/ followers/ids" rel=“nofollowers”> followers/ids 所以我不得不猜测, Linq2Twitter 代码大概是 http:// linqto twitter.copple.com/wikipage? title\ rurying%20 User%20Info& referringTitle= Getting% 20User%20 inforence" 。
var users = from tweet in twitterCtx.User
where tweet.Type == UserType.Show &&
tweet.ScreenName == "Sergio"
select tweet;
var user = users.SingleOrDefault();
var followers = user.Followers;
以下代码显示如何获取特定用户的所有追随者
var followers =
await
(from follower in twitterCtx.Friendship
where follower.Type == FriendshipType.FollowerIDs &&
follower.UserID == "15411837"
select follower)
.SingleOrDefaultAsync();
if (followers != null &&
followers.IDInfo != null &&
followers.IDInfo.IDs != null)
{
followers.IDInfo.IDs.ForEach(id =>
Console.WriteLine("Follower ID: " + id));
}
资料来源:Linq2Twitter Github
注意: 此方法调用仅限5,000名追随者。 如果您只需要统计追随者, 最好从Twitter网站上删除。
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...
I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...