【发布时间】:2015-01-06 21:19:12
【问题描述】:
我已按照教程http://codegerms.com/login-with-twitter-example-with-ios-tutorial-using-oauth/ 使用outh for twitter 获取访问令牌。 现在如何使用访问令牌获取用户个人资料信息?
【问题讨论】:
标签: ios twitter-oauth
我已按照教程http://codegerms.com/login-with-twitter-example-with-ios-tutorial-using-oauth/ 使用outh for twitter 获取访问令牌。 现在如何使用访问令牌获取用户个人资料信息?
【问题讨论】:
标签: ios twitter-oauth
按照使用访问令牌获取用户数据的教程进行操作,教程在同一站点上可用 http://codegerms.com/get-user-info-data-twitter-api-example-ios-objective-c/
【讨论】:
如果您想在不使用第三方库的情况下执行此操作,请查看https://dev.twitter.com/rest/tools/console,推特文档。
否则 STTwitter 是一个很好的库。你可以看看这个 Github Link to STTwitter
您可以轻松获取个人资料、收藏夹、分享
【讨论】:
用 tweetsharp.dll
试试这个string oauth_consumer_key = "your key";
string oauth_consumer_secret = "your secret";
TwitterService tweetservice = new TwitterService(oauth_consumer_key, oauth_consumer_secret);//tweet service you will get from tweetsharp dll
string token = "your token";
string tokenSecret = "your token secret";
tweetservice.AuthenticateWith(token, tokenSecret);
var tweet = tweetservice.GetUserProfile(new GetUserProfileOptions() { IncludeEntities = false, SkipStatus = false });
【讨论】: