Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Tweets doesnt load on page load

$
0
0

Hello All,

I am displaying twitter feeds on my webpage (Built on SharePoint 2013 online) using Twitter API, however tweets doesn't load on every page load i.e. Upon refreshing the page using Ctrl+F5 twitter feeds freeze like this

                        

But when page is refreshed normally (F5) tweets loads fine as shown below

                         

I have used the following script to fetch tweets from twitter API

$(document).ready(function(){  
loadTweets();
});
function loadTweets(){
jQuery(function ($) {

        $(".tweet").tweet({
            template: "{text}  {retweet_action} {reply_action} {favorite_action}",
            username: ["User Name", ],
            count: 30,
            loading_text: "Loading tweets..."
          }).bind("loaded", function () {
            $.each($('.tweet_text'), function () {
             /* logic to display content*/
    });
}


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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