twitter - twitter4j login android -
i followed tutorial @ http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/ things changed twitter_consumer_key
, twitter_consumer_secret
, set logintotwitter()
function asynctask because moaning network communication should not done on main activity. made sure on application twitter settings callback url filled in acted browser application.
i bit login twitter returned application
the bit doesn't come in code here work me is:
> accesstoken accesstoken = twitter.getoauthaccesstoken(requesttoken, > verifier);
which returns null value
i checked variable "verifier" not null , "requesttoken" has 3 values.
token={has value} tokensecret={has value} secretkeyspec={null}
does matter if "secrectkeyspec" null, or reddish herring
can please tell me going wrong.
i facing same issue, after dumping stacktrace discovered that:
accesstoken accesstoken = twitter.getoauthaccesstoken(requesttoken, verifier);
needs set on own thread. method getoauthaccesstoken executing httpconnection on main ui thread hence producing:
system.err android.os.networkonmainthreadexception
hope helps!
android twitter login twitter4j
No comments:
Post a Comment