How To Create Twitter Feed Widget For Website

Nowadays, it’s a trend to show your tweets on your website. Site owners preferred to show these tweets in the sidebar or footer. So, the visitors can read tweets easily. If they like your tweets then possibly they become a follower of you. In this article, we show how to create an official Twitter Feed Widget for your website.

Create Twitter Feed Widget

To create a widget you should first know your twitter URL. You can get it by clicking your Twitter name. In my case my Twitter URL is https://twitter.com/artisanswebblog. Below is the screenshot of how to get your URL.

Get Twitter URL

Once you get your Twitter URL, add the below HTML where you want to display the Twitter feed widget.

<a class="twitter-timeline"
href="https://twitter.com/artisanswebblog">
</a>
<script async 
src="//platform.twitter.com/widgets.js"
charset="utf-8"></script>

There are several attributes provided to customize your widget. Below is the list of attributes.

AttributesDescription
data-widthSet the height of your widget.
data-heightControl the frame of the widget. Possible values are noheader, nofooter, noborders, noscrollbar, transparent
data-chromeSet the color of links in tweets.
data-themeSet a theme for the widget. Possible values are light or dark.
data-link-colorSet the number of tweets for the widget.
data-tweet-limitSet the number of tweets for the widget.

You can use the above attributes and set the widget as per your requirements. By using the above attributes, I customize the HTML as below.

<a class="twitter-timeline"
href="https://twitter.com/artisanswebblog"
data-width="300" data-height="300"
data-chrome="noscrollbar" data-theme="dark"
data-link-color="#E95F28" data-tweet-limit="3">
</a>
<script async 
src="//platform.twitter.com/widgets.js"
charset="utf-8"></script>

Here is the screenshot of my final Twitter widget.

Twitter Feed Widget

In this post, we have discussed the official Twitter widget. If you wish to create a completely customize feed widget and you are using WordPress then please read our post HOW TO CREATE WORDPRESS TWITTER FEED PLUGIN

I hope you understand how to create an official Twitter feed widget. For any questions or suggestions please leave a comment below.

If you liked this article, then please subscribe to our YouTube Channel for video tutorials.

1 thought on “How To Create Twitter Feed Widget For Website

Leave a Reply

Your email address will not be published. Required fields are marked *