Hi there!
I’m trying to get expanded_urls from a search action but I’m unable to get it. The urls stay empty… My code is:
$url = 'https://api.twitter.com/1.1/search/tweets.json';
$requestMethod = 'GET';
$getfield = '?f=realtime&q=decorrespondent.nl%2F&src=typd';
$twitter = new TwitterAPIExchange($settings);
$api_response = $twitter ->setGetfield($getfield)
->buildOauth($url, $requestMethod)
->performRequest();
$response = json_decode($api_response);
foreach($response->statuses as $tweet)
{
echo "{$tweet->user->screen_name} : {$tweet->entities->urls->expanded_url}\n <br />";
}
?>
hope that someone can help me!