Sunday , 19 November 2017
Home » Technical » Do You Have Problems Showing Twitter Widgets? Here Is The Solution

Do You Have Problems Showing Twitter Widgets? Here Is The Solution

We saw our twitter profile widget on our website and it stopped working since a few days (precisely 11 June 2013). Which is the result of Twitter’s retiring of API Version V1 possibly, as it seems. There are several webmasters who would be showing the widget with the code similar to shown below.

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
  version:3 ,
  type: 'profile',
  rpp: 5,
  interval: 6000,
  width: 'auto',
  height: 270,
  theme: {
    shell: {
      background: '#333333',
      color: '#ffffff'
    },
    tweets: {
      background: '#05070a',
      color: '#ffffff',
      links: '#4aed05'
    }
  },
  features: {
    scrollbar: false,
    loop: true,
    live: false,
    hashtags: true,
    timestamp: true,
    avatars: false,
    behavior: 'default'
  }
}).render().setUser('thinkerviews').start();
</script>

And now running into the problem. The solution is pretty simple. Now you need to do the following to resolve the issue:

Step 1:
Login into your Twitter Account and go to settings

Twitter >> settings

Twitter >> settings

Step 2:
Go to Widgets » Create New

twitter >> Create New >> User Timeline Widget

twitter >> Create New >> User Timeline Widget

Step 3:
That will give you the new widget code similar to the following

<a class="twitter-timeline"  href="https://twitter.com/thinkerviews"  data-widget-id="346353038170157056">Tweets by @thinkerviews</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

Just replace the OLD code with this NEW one, and you are done!!!

Do let us know your thoughts via comments below…

Leave a Reply

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

*