OAuthTokens tokens = new OAuthTokens();
tokens.AccessToken = "188817262xxxxx";
tokens.AccessTokenSecret = "GNqhB1gkxxxx";
tokens.ConsumerKey = "Q6xxxxx";
tokens.ConsumerSecret = "2eZyxxxxxx";
var<TwitterUser> showUserResponse = TwitterUser.Show(tokens, "twitterUsername");
if (showUserResponse.Result == RequestResult.Success)
{
string screenName = showUserResponse.ResponseObject.ScreenName;
Response.Write(screenName);
Response.Write("<br>");
Response.Write(showUserResponse.ResponseObject.NumberOfFollowers);
}
使用此代码,我可以获得我的 TwitterscreenName
和numberOfFollowers
,但我想screenName
在我的 asp.net 应用程序上打印这些关注者。我怎样才能做到这一点?
FollowersOptions options = new FollowersOptions();
options.ScreenName = "wallace740";
TwitterResponse<TwitterUserCollection> followers = TwitterFriendship.Followers(options);
// Response.Write(followers.Content);
如何screenName
从这个 JSON 中获取我的追随者的 s(followers.Content
给我一个 JSON 结果)?