Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8517209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:38:07+00:00 2026-06-11T05:38:07+00:00

** UPDATE: Apparently the problem morphed into an XMLHttpRequest problem: XMLHttpRequest cannot load http://api.twitter.com/1/statuses/user_timeline.json?screen_name=bogdanch&.

  • 0

** UPDATE:

Apparently the problem morphed into an XMLHttpRequest problem:

XMLHttpRequest cannot load http://api.twitter.com/1/statuses/user_timeline.json?screen_name=bogdanch&. Origin http://adfix.ro is not allowed by Access-Control-Allow-Origin.

The code I’m using is:

(function ($) {
    var Twitter = {
        init: function () {
            this.insertLatestTweets("bogdanch")
        },
        insertLatestTweets: function (a) {
            var b = 5;
            var c = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=" + a + "&count=" + b + "&callback=?";
            $.getJSON(c, function (b) {
                var c = '<marquee behavior="scroll" scrollamount="1" direction="left">';
                for (var d in b) {
                    c += '<a href="http://twitter.com/' + a + "#status_" + b[d].id_str + '">' + b[d].text + " <i>" + Twitter.daysAgo(b[d].created_at) + "</i></a>"
                }
                c += "</marquee>";
                $("#twitter p").replaceWith(c);
                Twitter.fancyMarquee()
            })
        },
        fancyMarquee: function () {
            $("#twitter marquee").marquee("pointer").mouseover(function () {
                $(this).trigger("stop")
            }).mouseout(function () {
                $(this).trigger("start")
            }).mousemove(function (a) {
                if ($(this).data("drag") == true) {
                    this.scrollLeft = $(this).data("scrollX") + ($(this).data("x") - a.clientX)
                }
            }).mousedown(function (a) {
                $(this).data("drag", true).data("x", a.clientX).data("scrollX", this.scrollLeft)
            }).mouseup(function () {
                $(this).data("drag", false)
            })
        },
        daysAgo: function (a) {
            if ($.browser.msie) {
                return "1 day ago"
            }
            var b = (new Date(a)).getTime();
            var c = (new Date).getTime();
            var d = Math.round(Math.abs(c - b) / (1e3 * 60 * 60 * 24));
            var e = d + " days ago";
            if (d == 0) {
                e = "today"
            } else if (d == 1) {
                e = d + " day ago"
            }
            return e
        }
    };
    Twitter.init()
})(jQuery);

Is there a way I can avoid the XMLHttpRequest problem?

** Original post

I want to implement a horizontal marquee of my last 5 tweets and I followed this tutorial: http://artistutorial.blogspot.ro/2011/09/how-to-make-horizontal-scrolling.html. You can see my version of it here
The problem is that when I try to implement it on my site it’s not loading any tweets and using the Chrome inspector I see an Uncaught TypeError

Cannot call method 'getJSON' of undefined 
Twitter.insertLatestTweets 
Twitter.init 
(anonymous function)

I can’t understand why it works on pastebin and not in my site. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:38:08+00:00Added an answer on June 11, 2026 at 5:38 am

    In order to avoid the XMLHttpRequest to api.twitter.com I’ve made a php file which acts as a proxy. The file contains the following code:

    <?php
    header('Content-Type: text/xml');
    $tweets = file_get_contents('http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=TWITTER_USERNAME_HERE&count=6');
    echo $tweets;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem with VS 2010 apparently losing it's ability to load
UPDATE The problem is not the code, the problem is that you apparently can't
UPDATE: I'm getting this error: (No route matches /docs/index.html... ) when accessing admin.example.com/docs/index.html The
HI I have the following (apparently simple) problem: I have to install a simple
Final Update : Turns out the fix to this problem is a depressing one.
Goal : Update an existing host header for an IIS7.5 site with powershell Problem
EDIT: It turns out that the problem was with an input parm. Apparently, if
Howdy all. I am trying to solve a problem which is apparently not uncommon
The problem I have is my listcollectionview is taking 3-4 seconds to update. I
I'm beginner at Rails, and im actually stuck with apparently a beginner problem. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.