小编SKT*_*SKT的帖子

为什么在我的Android应用程序中发生消费者密钥/秘密对已经设置,IllegalStateException?

我在我的Android应用程序中集成Twitter,但我有以下异常: -

java.lang.IllegalStateException: consumer key/secret pair already set.
at twitter4j.TwitterBaseImpl.setOAuthConsumer(TwitterBaseImpl.java:264)
at com.flashdeal.twitter.TwitterApp.configureToken(TwitterApp.java:72)
at com.flashdeal.twitter.TwitterApp.access$7(TwitterApp.java:70)
at com.flashdeal.twitter.TwitterApp$3.run(TwitterApp.java:150)
Run Code Online (Sandbox Code Playgroud)

我已经更改了我的消费者和密钥但是无法登录仍然得到了这个例外我的代码在这里: -

    public class TwitterApp {
    private Twitter mTwitter;
    private TwitterSession mSession;
    private AccessToken mAccessToken;
    private CommonsHttpOAuthConsumer mHttpOauthConsumer;
    private CommonsHttpOAuthProvider mHttpOauthprovider;
    private String mConsumerKey;
    private String mSecretKey;
    private ProgressDialog mProgressDlg;
    private TwDialogListener mListener;
    private Context context;

    public static final String CALLBACK_URL = "twitterapp://connect";
    private static final String TAG = "TwitterApp";

    public TwitterApp(Context context, String consumerKey, String secretKey) {
        this.context    = context;

        mTwitter        = new …
Run Code Online (Sandbox Code Playgroud)

twitter android

5
推荐指数
0
解决办法
2041
查看次数

标签 统计

android ×1

twitter ×1