谁能帮我用Tweetsharp API从Twitter获得国家信息? 我从一个程序来获取用户的细节写的摘要,但我无法得到用户的国家的细节。
string tweetText = string.Empty;
int count;
StringBuilder sbWebsite = new StringBuilder();
StringBuilder sbCountry = new StringBuilder();
TwitterTest obj = new TwitterTest();
TwitterService twitterService = obj.GetAuthentication();
TwitterUser objUser = twitterService.GetUserProfile(new GetUserProfileOptions { IncludeEntities = true, SkipStatus = false });
ListFollowersOptions objFollowerOptions = new ListFollowersOptions();
objFollowerOptions.UserId = objUser.Id;
objFollowerOptions.ScreenName = objUser.ScreenName;
objFollowerOptions.IncludeUserEntities = true;
objFollowerOptions.SkipStatus = false;
objFollowerOptions.Cursor = -1;
TwitterCursorList<TwitterUser> followers = twitterService.ListFollowers(objFollowerOptions);
for (int i = 0; i < followers.Count; i++)
{
if (followers[i].Status != null)
{
if (followers[i].Status.Place != null)
{
if (followers[i].Status.Place.Country != null)
sbCountry.Append(followers[i].Status.Place.Country + ",");
}
}
sbWebsite.Append(followers[i].Url + ",");
}