错误:Nosuchmethoderror twitter4j.internal.http.HttpParameter.encode

时间:2012-06-08 04:19:52

标签: android twitter-oauth twitter4j

目前,我正在做一个app上传视频到twitvid ..我在twitter4j中使用了authenticticateđể授权但是它显示错误作为标题在行签名* 这是我的代码:

    Values values = new Values();
    values.setSession(new Session()    
api = new TwitvidApi(values);            api.setSecureUrlEnabled(false);                                    
                Session session;                 
                session = api.authenticate(new TwitterAuthPack.Builder() (*)
                .setConsumerKey(twitter_consumer_key)
                .setConsumerSecret(twitter_secret_key)
                .setOAuthToken(accessToken.getToken())
                .setOAuthTokenSecret(accessToken.getTokenSecret())
                .build());                                                                          

                api.getValues().setSession(session);                   

                final UploadHelper helper = new UploadHelper(api);

                File file=new File("/mnt/sdcard/video1.flv");
                TwitvidPost twitvidPost = new TwitvidPost.Builder()
                        .setFile(file).setChunkSize(10485760)  /*10MB chunk size*/
                        .setMessage("Twitviding").setPostToTwitter(true).setListener(new uploadListener())
                        .create();
                try {
                    if (helper.upload(twitvidPost)) 
                    {
                        result=ok;
                    } 
                    else 
                    {
                        result=false;
                    }
                } catch (Exception e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }

            } catch (ApiException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }

0 个答案:

没有答案