Chris
Chris

Reputation: 9529

Embed tweets in webapp

I am currently developing a webapp (Django + Jquery) where users can submit (links) to tweets: For instance, I store

 https://twitter.com/BarackObama/status/2651151366

in my DB and embed that as a link in a website. Now I am wondering whether a tool (eg Jquery plugin) exists that would allow me to directly embed the content of above tweet in my website and to retrieve the attributes of a submitted link to a twitter feed.

Upvotes: 0

Views: 880

Answers (2)

air-dex
air-dex

Reputation: 4178

You can also retrieve the details of a tweet with this REST method : GET http://api.twitter.com/statuses/1/show.json?id=<id_of_the_tweet> and display the results like you want. More informations here : https://dev.twitter.com/docs/api/1/get/statuses/show/%3Aid

Upvotes: 1

Matt Gifford
Matt Gifford

Reputation: 1268

Twitter now make use of the oembed protocol:

https://dev.twitter.com/docs/api/1/get/statuses/oembed

So if you wanted to manage this manually, you could make a call to the oembed status request method via the Twitter API to get the correct content ready for display.

There is also a jQuery oembed plugin, available here:

https://github.com/starfishmod/jquery-oembed-all

There is also a Django oemned addition which may help you:

http://code.google.com/p/django-oembed/

One thing to consider is the Twitter display guidelines, which they are quite passionate about: (this link also has detailed information about their oembed features)

https://dev.twitter.com/docs/embedded-tweets

Upvotes: 0

Related Questions