I have a script that scrapes the Twitter search API and returns the results the URL’s in a tweet. However, it is currently returning no results. Why is this?
$search = json_decode(file_get_contents('https://search.twitter.com/search.json?q=%23google%20vine.co%2Fv%2F&result_type=recent&include_entities=1&rpp=10'));
foreach($search->results as $result) {
echo $result->urls->expanded_url.'<br>';
}
How can I make this work?
try with
$search->results is an array of objects, you have to iterate also this one