Created
February 11, 2015 07:42
-
-
Save joeyhipolito/0e8729eb49b2e50449ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "TwitterAPIExchange.php"; | |
$settings = array( | |
'oauth_access_token' => "<ACCESS_TOKEN>", | |
'oauth_access_token_secret' => "<ACCESS_TOKEN_SECRET>", | |
'consumer_key' => "<CONSUMER_KEY>", | |
'consumer_secret' => "<CONSUMER_SECRET>", | |
); | |
$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json'; | |
$getfield = '?screen_name=joeyhipolito_&count=1'; | |
$requestMethod = 'GET'; | |
$twitter = new TwitterAPIExchange($settings); | |
$response = $twitter->setGetfield($getfield) | |
->buildOauth($url, $requestMethod) | |
->performRequest(); | |
echo $response; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment