Let users tweet image from my website

media

#1

I dug through the web intents section of the documentation to no avail. I’m traversing the API now and it it seems overly complicated. As in the documentation isn’t insightful AT ALL so far. All I want to do is add a button to each image that allows users to share the image via twitter. Can ANYONE PLEASE lead me in the right direction or show me a simple example of how this can be done.


#2

Sorry you’re finding this so frustrating :frowning:

I think you’ve been looking at the obvious things - cards, and then web intents. Unfortunately right now, there’s no way to add an image to a Tweet via a web intent / Tweet button on the web. In the case of cards, you would need every image to have a unique URL and web page with embedded cards metadata.

The only method I can think of that would enable you to do this would be to have users of your website sign-in to a Twitter app you would have to build, and then use the media/upload and statuses/update API endpoints to post the image on their behalf. We have a large video upload sample app written in Python which demonstrates the general patten for how to do this, but it would need to be modified to work in a web context.