Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to display latest tweets from a twitter account using HTML ?

  • Last Updated : 10 Oct, 2021

In this article, we will see how to display the tweets of any user on our web page using HTML.

Twitter is one of the popular social media platforms. It is an American social networking service on which users can post and interact with messages called “tweets”. only registered users can tweet, like, and retweet others tweets, but unregistered users can also read those tweets which are publicly available. Everyone wants to display their tweets on their blogging websites. So, In this article, we are going to discuss how can we display someone’s tweet on our website in the easiest way with the help of HTML.

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

Approach: Below is the step-by-step implementation.

Step 1: Visit https://publish.twitter.com/



  • Enter profile link to whom you want to show tweets. ex – https://twitter.com/geeksforgeeks

Enter URL

Step 2: After that, a new page will pop up here click on Embedded Timeline.

Choose Embedded Timeline

Step 3: Then you will get your HTML code and a preview of account tweets. copy that HTML Code.

Preview

  • It will look the same as the below code but there will be a change in the href value.
  • You can also use this code and change the href value to your profiles account url.

Syntax:

HTML




<a class="twitter-timeline" 
    <!-- In your code value of href tag will be changed -->
    Tweets by Geeksforgeeks
</a>
  
<script async src=
</script>
  
<!-- It's a javascript file which will perform 
all actions which we need to show tweets-->

Step 4: Add the above code in your HTML file in which you want to show tweets and add some CSS to make it looks more beautiful and convenient.

Example:

HTML




<!DOCTYPE html>
<html>
  <head>
    <title>Tweets</title>
  </head>
  <body>
    <a class="twitter-timeline" href=
      <!-- In your code value of href tag will be changed -->
      Tweets by Geeksforgeeks
    </a>
  
    <script async src=
    </script>
    <!-- It's a javascript file which will perform all 
          actions which we need to show tweets-->
  </body>
</html>

Output:

Output




My Personal Notes arrow_drop_up
Recommended Articles
Page :