Processing
 

why am i getting an error on .verifyCredentials()

16/08/2016 19:18#1

Joined at: 4 months ago

Post: 1

Thank: 0

Thanked: 0

I want to get the data using twitter's fabric api but whenever i tend to verify credentials and use a callback it shows an error , specifically ,"The arguments differ in length"

void getUserData() {         Twitter.getApiClient(session).getAccountService()                 .verifyCredentials(true, false, new Callback<User>() {                      @Override                     public void failure(TwitterException e) {                      }                      @Override                     public void success(Result<User> userResult) {                          User user = userResult.data;                         String twitterImage = user.profileImageUrl;                          try {                             Log.d("imageurl", user.profileImageUrl);                             Log.d("name", user.name);                             Log.d("email",user.email);                             Log.d("des", user.description);                             Log.d("followers ", String.valueOf(user.followersCount));                             Log.d("createdAt", user.createdAt);                         } catch (Exception e) {                             e.printStackTrace();                         }                       }                  });       } 
30/08/2016 20:50Top#2

Joined at: 4 months ago

Post: 1

Thank: 0

Thanked: 0

Just change the twitter dependency in your Build.Gradle from

compile('com.twitter.sdk.android:twitter:2.0.0@aar') {     transitive = true; } 

to

compile('com.twitter.sdk.android:twitter:1.11.0@aar') {     transitive = true; } 

The new version of the .verifyCredentials() method doesn't accept a callback hence your error.

Similar articles

How do twitter giveaways work?

8 months ago - Reply: 2 - Views: 126

How may I get genuine followers on Twitter?

3 years ago - Reply: 33 - Views: 1,828

Login to Twitter sometime fail

6 months ago - Reply: 1 - Views: 23

Twitter doesn't accept PHP's cURL, but Linux'

1 year ago - Reply: 2 - Views: 90

Twitter OAuth on iOS

5 months ago - Reply: 1 - Views: 92

why am i getting an error on .verifyCredentials()

5 months ago - Reply: 1 - Views: 35

TwitteR setup_twitter_oauth() gives an error

5 months ago - Reply: 1 - Views: 29

Tweepy - Getting the author of a retweeted tweet

5 months ago - Reply: 0 - Views: 4

Retrieving data from twitter with JavaScript

5 months ago - Reply: 0 - Views: 2

Combined social media feed returning the wrong data

5 months ago - Reply: 0 - Views: 0

Django and Twitter request_token

5 months ago - Reply: 0 - Views: 0

Python HMAC hashed value encoding to base64

5 months ago - Reply: 1 - Views: 32

At the rate symbol in facebook

5 months ago - Reply: 0 - Views: 1

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re