user13096898
user13096898

Reputation:

How can I embed a Tweet?

How can I embed tweets inside of HTML? Let's say I want to embed this tweet: https://twitter.com/Rntk____/status/1245167253630251008

Is there any easy way to do this?

Upvotes: 1

Views: 2807

Answers (2)

user13096898
user13096898

Reputation:

  1. Click the button on your tweet
  2. Then, click the button that says </> Embed tweet
  3. All you need to do now is copy the code.

Here's what the code looks like:

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">🇮🇹 A 101-year-old man, who survived the Spanish flu pandemic &amp; World War II has now added <a href="https://twitter.com/hashtag/COVID%E3%83%BC19?src=hash&amp;ref_src=twsrc%5Etfw">#COVIDー19</a> to the list, after being discharged from hospital in Rimini.<br><br>Wow! 👏💙 <a href="https://twitter.com/Rntk____/status/1245167253630251008">pic.twitter.com/7OtN2Sv3lp</a></p>&mdash; World Updates (@Rntk____) <a href="https://twitter.com/Rntk____/status/1245167253630251008?ref_src=twsrc%5Etfw">April 1, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Here's what it looks like in an HTML page: Embedded Tweet in HTML

Upvotes: 2

anon
anon

Reputation:

Go to publish.twitter.com

Paste in the Tweet URL and hit Enter.

Then you can either customize via the link above the Tweet, or simply copy the code.

The alternative option is to use Twitter's oembed API endpoint to get the same information back via backend code, and embed into your site.

Upvotes: 0

Related Questions