4

I have a "share on Twitter" button on my website that allows users to easily share a tweet with the web page. The page features a photo, and we would really like to have users tweet the photo itself out.

Is it possible to build "tweet this photo" functionality from my website?

If I fill the image URL into the tweet, Twitter shows a link to the image, but not the image itself. Users can upload photo to twitter that get shown fully in Twitter.

5

The best solution I can think of is to use Twitter cards. This will mean though, that you would have to create a page for each image that you'd like Tweet-able - you may be able to get around this with some sort of lightbox iframe.

<meta name="twitter:image:src" content="IMAGESOURCE">

It looks like a lot of people are searching for the same thing as you. Good luck implementing this - I'd be keen to know what solution you end up using.

  • Presumably I would have to include the URL in the suggested tweet and Twitter would send a bot out to crawl the page and discover the meta tag, then load the picture? – Stephen Ostermiller Sep 5 '14 at 17:26
  • I'm already using <meta property="og:image" content="..."> for Facebook which does something similar. It would be nice if all the social sharing sites could standardize on a single meta tag for this. – Stephen Ostermiller Sep 5 '14 at 17:27
  • dev.twitter.com/docs/cards/getting-started says that they should already be using open graph og: attributes if you don't have twitter specific ones. I'm not sure why that isn't working then. – Stephen Ostermiller Sep 5 '14 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.