After removing the fabric, now Twitter set 3 is used in android
Happening:
I need to exchange text, image and video without opening Twitter Composer
I am sharing text, image and video using twitter 3 using method StatusesService
Therefore, I can share the text using the code below:
final TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();
StatusesService statusesService = TwitterCore.getInstance().getApiClient(session).getStatusesService();
statusesService.update("Click this link "+getShareLink(),null,null,null,null,null,null,null,null).enqueue(new Callback<Tweet>() {
@Override
public void success(Result<Tweet> result) {
Toast.makeText(context,"Tweet success ",Toast.LENGTH_SHORT).show();
Log.e(TAG,"Twitter "+ result.data.toString());
}
@Override
public void failure(TwitterException exception) {
Toast.makeText(context,"Tweet failure ",Toast.LENGTH_SHORT).show();
Log.e(TAG,"Twitter "+ exception.getMessage());
}
});
We can use the image to upload, and MediaService
we can use the method to upload it MediaService.upload()
, but MediaService
they only ask for images to upload and I also checked my documents.
And now How do I share a video on Twitter 3 using StatuesServices
or in any other way?
source
share