Twitter widget wont load on mobile device (Android, Chrome)


#1

I have added Twitter widget to my web page. If I load page on my PC, widget get loaded as expected. But when I test web page on mobile device widget isn’t loaded (only link is visible Tweets from https://twitter.com/.../).

Javascript, cookies are enabled.

Tested on Nexus 4, Android 5.0.1, Chrome 39.0.2171.93

What can I do? Thanks.


#2

Are you using a mobile-specific theme or other variations from your desktop site?

A Twitter timeline widget includes two parts: a link and a JavaScript file to convert the link into a full widget. The most common reason only a link is visible is the widgets JavaScript failing to load on the page. Check to make sure the Twitter widgets.js is available on the version of your website targeting Android Chrome.
https://platform.twitter.com/widgets.js


#3

This is all I have, all I did is copy-pase:

<a class="twitter-timeline" href="https://twitter.com/MavMatjaz/lists/who" data-widget-id="541272656818241538">Tweets from https://twitter.com/MavMatjaz/lists/who</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>

#4

Are you directly editing the HTML of a page? Or are you pasting into a CMS editor area, which may strip JavaScript content when outputting a theme?

An isolated test using JSFiddle:
http://jsfiddle.net/hvh91tgm/

I was able to load the JSFiddle page using Google Chrome device mode emulation for a Nexus 4. If the widget works in isolation but does not work in your website then the problem may be with your CMS or mobile theme.


#5

I have the same problem on iOS - pages won fine on desktop Safari but fail (as described above) when run on device.
I also just copy/pasted from Twitter site. Not using CMS.
Exactly the same code worked correctly a few weeks ago…


#6