Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Twitter API - How to pull in multiple users tweets?

Tags:

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?

like image 599
Probocop Avatar asked Apr 22 '10 15:04

Probocop


1 Answers

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

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

Hope that helps.

like image 105
Dylan Avatar answered Oct 21 '22 11:10

Dylan