I'm using this code:
require_once ("twitteroauth.php");
define('CONSUMER_KEY', 'XXX');
define('CONSUMER_SECRET', 'XXX');
define('ACCESS_TOKEN', 'XXX');
define('ACCESS_TOKEN_SECRET', 'XXX');
$toa = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
$query = array(
"q" => "#Misiones",
"result_type" => "recent",
"include_entities" => "true"
);
results = $toa->get('search/tweets', $query);
foreach ($results->statuses as $result) {
$user = $result->user->screen_name;
$text = $result->text;
To get tweets whit the hashtag #Misiones(the name of the place where i'm live). Works fine but i'm trying to get the image url (if the tweet have some).
I tryed with $result->media and $result->media->media_url and other convinations without succcess.