twip / twip

twitter api proxy in PHP
231 stars 60 forks source link

修正对API 1.1的支持 #44

Closed lordong closed 11 years ago

lordong commented 11 years ago

我在服务器更新到最后的twip4版本后发现mentions还是刷不出内容,然后我在uri_fixer函数的替换前后都记录了uri信息,发现有些客户端(比如UberTwitter0.791)还是发的replies.json指令,因此我修改成下面的代码就可以了:

    $replacement = array(
        'pc=true' => 'pc=false', //change pc=true to pc=false
        '&earned=true' => '', //remove "&earned=true"
        'mentions.json' => 'mentions_timeline.json', //backward compat for API 1.0
        'replies.json' => 'mentions_timeline.json', //backward compat for API 1.0
        'i/search.json' => 'search.json', //fix search issue on twitter for iPhone
    );

另外search API改成了 https://api.twitter.com/1.1/search/tweets.json ,并且要求认证,我在TwiTalker项目是修改成功了,只是建议。

tenwx commented 11 years ago

我按楼主的方法修改了$replacement = array的变量,seesmic1.8.6版的mentions可以刷出来了(1.8.8+的版本都不能twitter api了)。但你说的search API要在哪里修改?现在trends/lists还刷不出来

lordong commented 11 years ago

@tenwx search的用法参见 https://dev.twitter.com/docs/api/1.1/get/search/tweets ,如果你有兴趣可以去研究修改,如果想参考我修改的TwiTalker可以下载源码 https://dl.dropbox.com/u/5222117/cn-version.zip ,不过是python写的。

另外发现foing和foer等也刷不出来,看来彻底支持api 1.1还是有些事情要做。

boypt commented 11 years ago

.... 这些因为奇葩/过时客户端的请求,估计就不要往仓库里面塞了吧,自己需要的自己改咯。

tenwx commented 11 years ago

求android下好用的支持twitter api的客户端啊。。

tenwx commented 11 years ago

@lordong 现在search都需要认证了。这么坑

boypt commented 11 years ago

@tenwx twidere啊,很好用了嘛, @mariotaku 做的。

tenwx commented 11 years ago

@pentie 有广告否,要收费否?

yegle commented 11 years ago

@tenwx

小马过河知道吗? 试试不就知道了? 这里是issue tracker谢谢。