PHP Twitter API - 如何拉入多个用户的推文? [英] PHP Twitter API - How to pull in multiple users tweets?

查看:52
本文介绍了PHP Twitter API - 如何拉入多个用户的推文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将如何使用 PHP 从多个 twitter 用户中提取推文,并将它们作为一个组合列表的一部分显示在我的页面上?

How would I go about pulling in tweets from multiple twitter users with PHP and displaying them as part of one combined list on my page?

推荐答案

使用搜索 API 和布尔 OR 运算符.例如,这里是 CNN Breaking News 和 NPR All Things Considered 的 URL:

Use the search API and boolean OR operator. For example here is the URL for CNN Breaking News and NPR All Things Considered:

http://search.twitter.com/search.json?q=from%3acnnbrk+OR+from%3anpratc

查询是 URLEncoded 所以使用 Fiddler 工具 -> 文本编码/解码或你最喜欢的工具来查看纯文本的正确格式是:

The query is URLEncoded so use Fiddler Tools -> Text Encode/Decode or your favorite tool to see that the correct format in plain text is:

q=from:cnnbrk+OR+from:npratc

希望有所帮助.

这篇关于PHP Twitter API - 如何拉入多个用户的推文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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