I have a database of Tweet IDs, acquired from search/tweets
, that I need to eventually convert to oEmbed format. In order to do this, the first step is to get a Tweet's URL. How can I link to a tweet using only the ID?
Asked
Active
Viewed 453 times
2

Yogeshree Koyani
- 1,649
- 10
- 19

jonlambert
- 432
- 7
- 14
1 Answers
2
You can just use the statuses/oembed
call. As the documentation states, you don't need the full url, you can also use just the tweet ID.
Example: https://api.twitter.com/1.1/statuses/oembed.json?id=507185938620219395
From Twitter's blog: https://blog.twitter.com/2014/pro-tip-for-embedding-tweets-use-the-oembed-api-endpoint

Dan Leveille
- 3,001
- 2
- 24
- 28
-
1Great - thanks. I was tearing my hair out attempting to find out why `statuses/oembed` was returning a 34 error. It turns out my IDs were the `bigint` versions - not `id_str`. – jonlambert Jul 20 '15 at 09:19