Let user post tweet with media


#1

Hello,

I would like users of my web application to post a photo tweet to their twitter feed via a sharing button on my website.

I understand that there are many libraries that implement the “POST statuses / update_with_media” endpoint, but as far as I’m aware, this is for posting to one single account and does not allow users to post to their own feed.

The functionality should be similar to a twitter share button, but allow a photo to be shown in the tweet itself.

Please let me know if this is possible. Thanks.


#2

The Tweet Web Intent does not support a site passing a reference to a photo binary to be uploaded to the current user’s account and posted in her Tweet.

Sites with an existing relationship with the current user, write permissions granted to your Twitter app, may publish using the REST API as you have already discovered.

A site could choose to include an existing pic.twitter.com URL in a Tweet. Example: https://pic.twitter.com/gJHYxEjJBc

You can include a link in the post to a page marked up to display a Twitter photo card.
https://dev.twitter.com/cards/types/photo


#3