· 9 years ago · Oct 18, 2016, 07:10 PM
1<?php
2$consumerKey = '';
3$consumerSecret = '';
4$oAuthToken = '';
5$oAuthSecret = '';
6
7require_once('twitteroauth.php');
8
9$tweet = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret);
10
11$result = $tweet->get('search/tweets', array('q' => '#HASHTAG_BUSCADA', 'count' => 1, 'result_type' => 'recent'));
12
13$out="";
14$t = json_decode($result, true);
15foreach ($t['statuses'] as $user) {
16 echo $res = $out."".$user['text']."<br/>";
17}
18?>