Tweets are not posted using Fabric

android

#1

I’m trying to post tweets form my android application. After the user authorize my application to use its account, normally the tweet have to be posted automatically but in my case, nothing happened. The authentication part works fine, the problem is in the share part. Using Fabric, this is how I post the tweet:

TwitterSession session = Twitter.getSessionManager().getActiveSession();
StatusesService statusesService = Twitter.getApiClient(session).getStatusesService();
statusesService.update(message, null, null, null, null, null, null, null, String.valueOf(new Callback<Tweet>() {
@Override
public void success(Result<Tweet> result) {
Log.d("Tweet", "post success");
}
@Override
public void failure(TwitterException e) {
e.printStackTrace();
}
}));

When I debug the success and the failure. I got any error, no exception, but nothing is posted. What is wrong with what I’m doing?


#2

Is your session valid? In a previous issue I see you were unable to get the active session.


#3

Yes! I solved the problem of the session


#4

Maybe adding more logging would help? See: https://github.com/twitter/twitter-kit-android/blob/master/samples/app/src/main/java/com/example/app/SampleApplication.java#L66


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.