jonlambert
jonlambert

Reputation: 432

Is there a standard way of linking to a tweet using solely the ID?

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?

Upvotes: 2

Views: 468

Answers (1)

Dan Leveille
Dan Leveille

Reputation: 3210

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

Upvotes: 2

Related Questions