http://twitter.com/statuses/user_timeline/12345.json?callback=twitterCallback2&count=3


#1

http://twitter.com/statuses/user_timeline/12345.json?callback=twitterCallback2&count=3 is no longer working. What should be the new URL?


#2

See this FAQ entry for more information:

[faq:11716]


#3

The link works directly on the browser but fails from within the website. Any other change that we may be missing?


#4

Got the same problem. Within weeks, my embedded tweet is not appearing on my website.

Please we need HELP and a SOLUCTION URGENT ! thx


#5

got it !

https://dev.twitter.com/discussions/8555

@WyandanchLib WyandanchLib
Oh snap I got the issue resolved. Thanks @episod for posting information
Previous working code
"html://twitter.com/statuses/user_timeline/WyandanchLib.json?callback=twitterCallback2&count=1"

New Updated Code
"htmls://api.twitter.com/1/statuses/user_timeline/WyandanchLib.json?callback=twitterCallback2&count=1"

5 days 20 hours ago reply


#6

even with the code;
“htmls://api.twitter.com/1/statuses/user_timeline/WyandanchLib.json?callback=twitterCallback2&count=1”

it doesn’t work. is that possible


#7

replace “htmls” with “https”


#8

great, now it’s working again!


#9

Can anybody help me with Tumblr?
The theme I’m using posts 4 or 5 twitter statuses through on the page, but it’s ceased to have function. In the main HTML body, I have managed to update the API link:

{block:IfTwitterUsername}

Twitter

    {/block:IfTwitterUsername}

    But I’m not sure if that’s right, and I think the script with it needs to be updated but I’m not sure what to change:

    function twitterCallback2(twitters) {
    var statusHTML = [];
    for (var i=0; i<twitters.length; i++){
    var username = twitters[i].user.screen_name;
    var status = twitters[i].text.replace(/((https?|s?ftp|ssh)://[^"\s<>]*[^.,;’">:\s<>)]!])/g, function(url) {
    return ‘’+url+’’;
    }).replace(/\B@([_a-z0-9]+)/ig, function(reply) {
    return reply.charAt(0)+’’+reply.substring(1)+’’;
    });
    statusHTML.push(’

  • ’+status+’’+relative_time(twitters[i].created_at)+’
  • ’);
    }
    document.getElementById(‘twitterfeed’).innerHTML = statusHTML.join(’’);
    }

    function relative_time(time_value) {
    var values = time_value.split(" ");
    time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3];
    var parsed_date = Date.parse(time_value);
    var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
    var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
    delta = delta + (relative_to.getTimezoneOffset() * 60);

    //’+relative_time(twitters[i].created_at)+’

    if (delta < 60) {
    return ‘less than a minute ago’;
    } else if(delta < 120) {
    return ‘about a minute ago’;
    } else if(delta < (6060)) {
    return (parseInt(delta / 60)).toString() + ’ minutes ago’;
    } else if(delta < (120
    60)) {
    return ‘about an hour ago’;
    } else if(delta < (246060)) {
    return ‘about ’ + (parseInt(delta / 3600)).toString() + ’ hours ago’;
    } else if(delta < (486060)) {
    return ‘1 day ago’;
    } else {
    return (parseInt(delta / 86400)).toString() + ’ days ago’;
    }
    }

    Can anybody help?


    #10

    You won’t be able to use API v1.1 in this way with unauthenticated Javascript-based requests.

    Until March 2013, you can use API v1 this way though by changing this one line to:


    #11

    I had the same problem but i fixed it!
    just change

    this > http://twitter.com/statuses/user_timeline/

    with > https://api.twitter.com/1/statuses/user_timeline/

    done!

    bless!!


    #12

    can have like you say 2 of “?” ?


    #13

    And now, with the upgrade to API 1.1, all of our apps are broken again. Thanks, Twitter.


    #14

    I have your same problem with the update of the API 1.1 with the following error:
    twittercallback2 ({“errors”: [{“message”: “Sorry, That page does not exist”, “code”: 34}]});

    Someone has resolved?


    #15

    Need help getting my feed to work since update to V1.1
    my code is:

    // JavaScript Document
    function twitterCallback2(twitters) {
    var statusHTML = [];
    for (var i=0; i<twitters.length; i++){
    var username = twitters[i].user.screen_name;
    var status = twitters[i].text.replace(/((https?|s?ftp|ssh)://[^"\s<>]*[^.,;’">:\s<>)]!])/g, function(url) {
    return ‘
    view details’;
    }).replace(/\B@([_a-z0-9]+)/ig, function(reply) {
    return reply.charAt(0)+’’+reply.substring(1)+’’;
    });
    statusHTML.push(’

  • posted ‘+relative_time(twitters[i].created_at)+’
    ’+status+’
  • ’);
    }
    document.getElementById(‘twitter_update_list’).innerHTML = statusHTML.join(’’);
    }

    function relative_time(time_value) {
    var values = time_value.split(" ");
    time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3];
    var parsed_date = Date.parse(time_value);
    var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
    var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
    delta = delta + (relative_to.getTimezoneOffset() * 60);

    if (delta < 60) {
    return ‘less than a minute ago’;
    } else if(delta < 120) {
    return ‘about a minute ago’;
    } else if(delta < (6060)) {
    return (parseInt(delta / 60)).toString() + ’ minutes ago’;
    } else if(delta < (120
    60)) {
    return ‘about an hour ago’;
    } else if(delta < (246060)) {
    return ‘about ’ + (parseInt(delta / 3600)).toString() + ’ hours ago’;
    } else if(delta < (486060)) {
    return ‘1 day ago’;
    } else {
    return (parseInt(delta / 86400)).toString() + ’ days ago’;
    }
    }

    Any ideas on how to get this working again would be greatly appricated…


    #16

    To my knowledge, there’s no way to achieve the above anymore using JavaScript due to security upgrades. You’ll have to develop a back-end means of achieving the same thing.

    For example, to use 1.1 with PHP, you can head over to webdevdoor.com. He’s got it working using the setup discussed here:

    http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/

    And you can format the appearance of the JSON response (and limit the number of tweets if you only want to show the last tweet) by following the guidelines here:
    http://www.webdevdoor.com/javascript-ajax/custom-twitter-feed-integration-jquery/


    #17

    hi,
    this is crazy - why on earth would they do this!

    I’m not having success:
    I need the latest tweet on this page at the top by the birdy:


    Here’s my text page, but it’s not working:
    http://goborder.com/get-tweets1.1.php


    #18

    thk, 1.1 -_-;;
    All of example in Every book might be not working!!! anymore


    #19