Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 80923

Embedded twitter feed not loading every time

$
0
0

Hi there

We are implementing a twitter feed using the instructions in these posts (thanks to those who posted):

https://forum.mendixcloud.com/link/questions/7142

and

https://forum.mendixcloud.com/link/questions/6908

We used the following code in separate snippets:

HTML Snippet 1 (Masked data-widget-id and User):

<a class="twitter-timeline" href="https://twitter.com/search?q=%40MyUser" data-tweet-limit="1" data-chrome="noheader nofooter noborders noscrollbar transparent" data-widget-id="MyWidgetID">Tweets about @MyUser</a>

Javascript Snippet 1 (JQuery not enabled):

!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");

Javascript Snippet 2 (JQuery not enabled):

if (typeof twttr != "undefined")
{
twttr.widgets.load( );
}

The timeline feed seems to load content sporadically (once every few minutes) and produces nothing when we refresh the page on subsequent loads (i.e. we only see an empty block on the page).  When it produces something it sometimes renders a nicely rendered version we expect, sometimes produces a poorly rendered version of what we expect and sometimes it just produces a link to twitter.  I placed console.log() lines in the Javascript at certain sections for debugging purposes and I can see these points triggered in the console which tells me that the code is triggered.  There aren't any errors in the console.

Has anyone else seen something similar?

Many thanks


Viewing all articles
Browse latest Browse all 80923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>