View difference between Paste ID: nMCi2LDb and 8y7Qzvsq
SHOW: | | - or go back to the newest paste.
1
<?php
2
require "autoload.php";
3
4
use Abraham\TwitterOAuth\TwitterOAuth;
5
6
define('CONSUMER_KEY', 'WzkYBewn49NLbQiV5tCNE0r1G');
7
define('CONSUMER_SECRET', 'LGfKf7uZPUIR8UrunK7Rss49VCK3a9Soa3eTmD8a9dl09EPbsU');
8
define('ACCESS_TOKEN', '1974211434-3HcOAq8WEgScDIghMwXx9kON7dPzQECz6bUfLqn');
9
define('ACCESS_TOKEN_SECRET', 'GDkxYf5CAfcYmfR5T4QvuT12HutpdcKtxjpKSKAcpj2VP');
10
 
11
$conn = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
12
$query = array(
13
	"q" => "#FeedTT2",
14
//	"count" => ,
15
	"result_type" => "recent"
16
);
17
$tweets = $conn->get('search/tweets', $query);
18
foreach ($tweets->statuses as $tweet) {
19
//	echo '<p>'.$tweet->text.''.$tweet->user->screen_name.";
20
}
21
echo "<b>";
22
var_dump($tweet);
23
24
?>