Using Twitter's Web Intents - a Little Gotcha

For the US Twitter/Vine Map I've been playing with, I wanted to allow the user to reply to, retweet, or favorite the tweet containing a particular Vine video.  Based on a read of twitter's web intents, this looks really really simple.  But it wasn't working for me.  The fix was to make sure and use the tweet's id_str (string) property and NOT the numerical id property that you get back from the search api call.  There must be an encoding issue going on somewhere.

As described on the twitter page, here are the basic pieces you need (note that there is a typo on the twitter url they have on their doc page):



So, if you are constructing the strings for the urls dynamically, make sure and use the string representation of the tweet's id.

You can see it in action by watching the Vine map visualization, and clicking on one of the Reply/Retweet/Favorite links that are to the right of the Vine video.  You will be prompted to log into twitter if you're not already, and you get a final chance to confirm the action.

Real-Time Searchable Twitter/Vine Map, with Twitter Interaction (click image to go to map)

Obligatory cat included in screenshot.




Popular Posts