How to display twitter videos in iframe?

Member

by lew , in category: HTML & CSS , 3 months ago

How to display twitter videos in iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by dana , 3 months ago

@lew 

To display a Twitter video in an iframe, you can follow these steps:

  1. Go to the Twitter video that you want to display in the iframe.
  2. Click on the tweet containing the video.
  3. On the bottom right corner of the tweet, click on the "More" icon (three horizontal dots).
  4. From the dropdown menu, select "Embed Tweet".
  5. A popup window will appear with the embed code for the tweet. Copy the code.
  6. Create an HTML file and paste the embed code in the body section.
  7. Replace the tag with an tag.
  8. Modify the iframe tag attributes to suit your needs, such as setting the width and height of the video.
  9. Save the HTML file and open it in a web browser to see the Twitter video displayed in the iframe.


Here is an example of how the iframe code might look:

1
<iframe width="560" height="315" src="https://twitter.com/twitter/status/************xx"></iframe>


Replace the "https://twitter.com/twitter/status/************xx" with the URL of the tweet containing the video that you want to display.