emersonthis
emersonthis

Reputation: 33348

Twitter embedded timeline never updates

We're using the Twitter Embedded Timeline widget which is documented here.

According to the documentation, it is supposed to auto-update its self "in real time":

These new timeline tools are built specifically for the web, mobile web, and touch devices. They load fast, scale with your traffic, and update in real-time.

But it is not doing that. The iframe loads fine initially, but then never updates. When I watch the network tab in the Chrome developer tools, I don't see any errors, or further network requests for data.

Has anyone else noticed this? Is the documentations simply incorrect and that functionality doesn't exist? I'm using the this code snippet, provided by Twitter:

<a class="twitter-timeline" data-screen-name="foxnews" data-widget-id="11111111111111" data-chrome="nofooter noheader noscrollbar transparent" data-tweet-limit="10"></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");
  if (typeof(twttr) !== "undefined") {
    twttr.widgets.load();
  }
</script>

UPDATE The updates will appear if I use the snippet exactly as-is from the wizard/generator. However when I add the customization data attributes, it stops working.

Upvotes: 6

Views: 1229

Answers (2)

emersonthis
emersonthis

Reputation: 33348

It turns out that this is the expected behavior when using data-tweet-limit="#" to customize the number tweets which appear. When I remove this attribute the widget polls for updates again.

Upvotes: 1

Theo Bearman
Theo Bearman

Reputation: 79

This code appears to be out of date. Can you try this and see if it works?

<a class="twitter-timeline" href="https://twitter.com/FoxNews" data-widget-id="591265000628559874">Tweets by @FoxNews</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>

If it does, you can create your own widget (make sure you're logged in to Twitter first) here.

Upvotes: 0

Related Questions