Android中通过SocialLib访问twiiter的问题
在我的应用程序中,我应该使用SocialLib并编写简单的代码来访问twitter:Android中通过SocialLib访问twiiter的问题,android,twitter,Android,Twitter,在我的应用程序中,我应该使用SocialLib并编写简单的代码来访问twitter: TwitterConnector twitter = SocialNetworkHelper .createTwitterConnector(CONS_KEY, CONS_SEC, CALLBACK); try { twitter.requestAuthorization(this); twitter.authorize(this); }
TwitterConnector twitter = SocialNetworkHelper
.createTwitterConnector(CONS_KEY, CONS_SEC, CALLBACK);
try {
twitter.requestAuthorization(this);
twitter.authorize(this);
} catch
当我运行此代码时,我捕获到以下选项:
oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: api.twitter.com
您知道问题出在哪里吗?您是否已将internet权限添加到您的AndroidManifest.xml中
是的,我忘了。真是个傻瓜。但现在我在twitter.authorizethis;中发现了NullPointerException。我无法获取请求令牌。也许你知道怎么解决这个问题吗?抱歉,不是马上就解决的-也许值得为此提出一个不同的问题