使用 Twitter user_timeline 以 JSON 格式提取转推 [英] Pulling Retweets using Twitter user_timeline in JSON format

查看:43
本文介绍了使用 Twitter user_timeline 以 JSON 格式提取转推的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用脚本..

I'm currently using the script..

http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&count=1

.. 为一些用户提取最新的推文以显示在我的网站上.但是,我遇到了 JSON 格式不显示转推的问题.我已阅读此链接您必须使用retweeted_by_me"来显示转推,因为我不太确定如何将其与我当前的脚本合并.

.. to pull the most recent Tweet for a number of users to display on my website. However, I've ran into the problem that the JSON format doesn't display Retweets. I've read from this link that you must use "retweeted_by_me" to also display Retweets by I'm not quite sure how I would merge that with my current script.

推荐答案

EDIT :自 Twitter API 1.1 版 起,使用以下格式.(需要身份验证)

EDIT : As of Twitter API Version 1.1, use the following format. (Needs Authenticaton)

https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=nikhilkuruvilla&include_rts=true

更新的文档可以在这里找到

The updated documentation can be found here

https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline

[更新]以下方法适用于 Twitter API 版本 1,现在弃用.

[UPDATE] The following methods apply to Twitter API Version 1 and is Deprecated now.

使用新的 twitter API 并添加 include_rts=true 例如:http://api.twitter.com/1/statuses/user_timeline.json?screen_name=nikhilkuruvilla&include_rts=true

Use the new twitter API and add include_rts=true Eg: http://api.twitter.com/1/statuses/user_timeline.json?screen_name=nikhilkuruvilla&include_rts=true

完整文档可以在这里找到:http://dev.twitter.com/doc/get/statuses/user_timeline

Full documentation can be found here : http://dev.twitter.com/doc/get/statuses/user_timeline

这篇关于使用 Twitter user_timeline 以 JSON 格式提取转推的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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