Share gif as tweet from website

image
web

#1

Hi everyone,
I’m new to twitter here and I need help to realize this.
I have a page where there are a lot of GIF, I would be able to add on each of them the posibility to share them directly on Twitter, so when the user post the tweet is should looks like a normal tweet with my gif attached.
Is that possible?

EDIT:
Maybe can I change the og:image and take the URL of the gif and handle the change in js?
Something like

image.on('click', function(){ var newlink = $(this).attr('url'); $('meta[property=og:imge]').attr('content', newlink); });

ps: sorry for the unformatted code, but it doen’t indent itself :confused:


#2

You won’t be able to do this using the Web Intent from the Tweet button as that only supports text. Your second option using Cards will not work as GIFs are not supported, and the tags would need to be static in order for the cards crawler to use them anyway.

The only thing I can think of is that you’d need to build a web app to upload the GIF on the server side on behalf of the user. Twitter transcodes GIFs to MP4 so you’d need to use the media/upload endpoint. This probably is not trivial if you don’t do much backend coding.


#3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.