Twitter 404-消息“:"“很抱歉,该页面不存在",“代码":34 [英] Twitter 404 - message":"Sorry, that page does not exist","code":34

查看:63
本文介绍了Twitter 404-消息“:"“很抱歉,该页面不存在",“代码":34的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了最近开始发生的以下事情(我相信是从Twitter APi的更新):

i'm getting the following, which recently started happening (from updates to the Twitter APi i believe):

jquery17209743677265942097_1350344103606({"errors":[{"message":"Sorry, that page does not exist","code":34}]});

这是我当前正在使用的脚本:

this is the script i am currently using:

        <script src="/wp-content/misc/jquery.marquee.js"></script>
    <script>
        var Twitter = {
            init: function () {
                // Pass in the username you want to display feeds for
                this.insertLatestTweets('clubsouz');
            }, 

            // This replaces the <p>Loading...</p> with the tweets
            insertLatestTweets: function (username) {
                var limit   = 5;    // How many feeds do you want?
                var url     = 'http://twitter.com/statuses/user_timeline.json?screen_name=' + username + '&count=' + limit + '&callback=?';

                // Now ajax in the feeds from twitter.com
                jQuery.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 target="_blank" href="http://twitter.com/' + username + '#status_' + data[i].id_str + '">' + data[i].text + ' <i>' + Twitter.daysAgo(data[i].created_at) + '</i></a>';
                    }

                    html += '</marquee>';

                    // Now replace the <p> with our <marquee>-element
                    jQuery('#twitter p').replaceWith(html);

                    // The marquee element looks quite shite so we'll use Remy Sharp's plug-in to replace it with a smooth one
                    Twitter.fancyMarquee();
                });
            }, 

            // Replaces the marquee-element with a fancy one
            fancyMarquee: function () {
                // Replace the marquee and do some fancy stuff (taken from remy sharp's website)
                jQuery('#twitter marquee').marquee('pointer')
                    .mouseover(function () {
                        jQuery(this).trigger('stop');
                    })
                    .mouseout(function () {
                        jQuery(this).trigger('start');
                    })
                    .mousemove(function (event) {
                        if (jQuery(this).data('drag') == true) {
                            this.scrollLeft = jQuery(this).data('scrollX') + (jQuery(this).data('x') - event.clientX);
                        }
                    })
                    .mousedown(function (event) {
                        jQuery(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
                    })
                    .mouseup(function () {
                        jQuery(this).data('drag', false);
                    });
            }, 

            // Takes a date and return the number of days it's been since said date
            daysAgo: function (date) {
                // TODO: Fix date for IE...
                if (jQuery.browser.msie) {
                    return '1 day ago';
                }

                var d = new Date(date).getTime();
                var n = new Date().getTime();

                var numDays = Math.round(Math.abs(n - d) / (1000 * 60 * 60 * 24));
                var daysAgo = numDays + ' days ago';

                if (numDays == 0) {
                    daysAgo = 'today';
                }
                else if (numDays == 1) {
                    daysAgo = numDays + ' day ago';
                }

                return daysAgo;
            }
        };

        Twitter.init();
    </script>

谢谢.

推荐答案

将网址从http://twitter.com/statuses/user_timeline.json?更新为https://api.twitter.com/1/statuses/user_timeline.json?.

已将其修复.

这篇关于Twitter 404-消息“:"“很抱歉,该页面不存在",“代码":34的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆