I would like to share pictures in twitter

media-upload

#1

I would like to share pictures in twitter,but i don’t know how to get the media_id, thank you!
this is my method:

TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient(Twitter.getSessionManager().getActiveSession());
StatusesService statusesService = twitterApiClient.getStatusesService();
statusesService.update(content, null, null, null, null, null, null, null, "471592142565957632", new Callback<Tweet>() {
    @Override

    public void success(Result<Tweet> result) {
    }

    @Override
    public void failure(TwitterException e) {
  
     
    }
});

#2

Hey @guohaiping521,

Are you trying to do this solely through the REST API or via Fabric?

-Mike


#3

Also, here are two examples that may help, though they are written in Swift:

https://docs.fabric.io/apple/examples/cannonball/index.html#sharing-content-to-twitter