Can't get favorites to work #283

Closed
Zweischneid opened this Issue Oct 5, 2012 · 5 comments

Comments

Projects
None yet
3 participants

Hi

I am having a bit of a problem with the favorites option. With the following, it get's hung up on "loading favorites..."

jQuery(function($){
    $("#favorites").tweet({
      avatar_size: 48,
      count: 1,
      username: "sanityinc",
      favorites: true,
        template: "{custom}",
      loading_text: "loading favorites..."
    }).bind("loaded",function(){$(this).find("a").attr("target","_blank");});
  });

Just removing the favorites from the code, it works quite alright (though it doesn't show favorites obviously, but regular tweets).

jQuery(function($){
    $("#favorites").tweet({
      avatar_size: 48,
      count: 1,
      username: "sanityinc",
        template: "{custom}",
      loading_text: "loading favorites..."
    }).bind("loaded",function(){$(this).find("a").attr("target","_blank");});
  });

Any ideas what might be the issue?

Collaborator

purcell commented Oct 5, 2012

Assuming you don't see related errors in the javascript console, the problem will be either because you have hit a rate limit (150req/hr per source IP) or because the favorites API endpoint is returning empty results -- this occasionally seems to happen, just like it does for the search endpoint, due to backend issues at Twitter. Often the timeline API will work very reliably, while the other "minor" APIs have issues.

The same "favorites" example is working fine for me, FWIW.

damonsk commented Oct 19, 2012

Experiencing this aswell. Console reports 404 on the url called from within jQuery http://api.twitter.com/favorites/damonsk.json?page=1&count=10&callback=jQuery1640743424596497789_1350632538124&_=1350632557894

Changing the url to the following

http://api.twitter.com/1/favorites/damonsk.json?page=1&count=10&callback=jQuery1640743424596497789_1350632538124&_=1350632557894

Notice the /1/ after twitter.com. This resolves the 404.

Therefore set twitter_api_url to api.twitter.com/1/

Collaborator

purcell commented Oct 19, 2012

In this case you have an old version of jquery.tweet.js -- recent versions use the "/1/".

damonsk commented Oct 19, 2012

More than likely. I'll plan an upgrade.

Good job on the script.

Sent from my iPhone

On 19 Oct 2012, at 10:50, Steve Purcell notifications@github.com wrote:

In this case you have an old version of jquery.tweet.js -- recent versions use the "/1/".


Reply to this email directly or view it on GitHub.

@purcell purcell closed this Dec 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment