0
|
1 <?php
|
|
2 require "vendor/autoload.php";
|
|
3 require "api_info.php";
|
|
4 use Abraham\TwitterOAuth\TwitterOAuth;
|
|
5
|
|
6 $queryArr = [
|
|
7 "screen_name" => "envato",
|
|
8 "count" => 3,
|
|
9 ];
|
|
10
|
|
11 $getArr = $_GET;
|
|
12 $queryArr = array_merge( $queryArr, $getArr );
|
|
13
|
|
14 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_KEY_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
|
|
15 $content = $connection->get("account/verify_credentials");
|
|
16 $statuses = $connection->get("statuses/user_timeline", $queryArr);
|
|
17
|
|
18 header('Content-Type: text/json');
|
|
19 echo json_encode($statuses);
|
|
20
|