I'm currently working on creating a scrolling Twitter feed by following the steps outlined in this tutorial.
However, I am encountering an issue where it does not work as expected. The feed starts to load but then turns white. Despite implementing a suggested correction from the comments section, the problem still persists. For those familiar with this process, could you please advise on what code needs to be altered from the original to ensure that it functions correctly?
I suspect that the root of the issue lies within this snippet:
// This replaces the <p>Loading...</p> with the tweets
insertLatestTweets: function (username) {
var limit = 5; // How many feeds do you want?
var url = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name= + username + '&count=' + limit + '&callback=?';
// Now ajax in the feeds from twitter.com
$.getJSON(url, function (data) {
// We'll start by creating a normal marquee-element for the tweets
var html = '<marquee behavior="scroll" scrollamount="1" direction="left">';
// Loop through all the tweets and create a link for each
for (var i in data) {
html += '<a href="http://twitter.com/' + username + '#status_' + data[i].id_str + '">' + data[i].text + ' <i>' + Twitter.daysAgo(data[i].created_at) + '</i></a>';
}
html += '</marquee>';