How do I share videos on twitter using Twitter toolkit 3 in Android?
After removing the structure, now use Twitter toolkit 3 in twitter
Case:
>I need to share text, images and videos without opening twitter composer > I use statuseservice to share text, images and videos using Twitter toolkit 3 > so I can share text using the following code:
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());
}
});
>For image upload, we can use mediaservice and upload it. We can use mediaservice. Upload() method, but mediaservicethey only prompt to upload images, and I also checked their documents. > now how to share videos in twitter toolkit 3 using statues services or any other method?
resolvent:
1) Native video upload support is only applicable to IOS (see attachment)
2) Fast error resolution you can convert the video to GIF and upload it
3) The right solution:
You can use the extend suite and the media / uploads endpoint
See this to issue a post request