Skip to content

Instantly share code, notes, and snippets.

@joeyhipolito
Created February 11, 2015 07:42
Show Gist options
  • Save joeyhipolito/0e8729eb49b2e50449ce to your computer and use it in GitHub Desktop.
Save joeyhipolito/0e8729eb49b2e50449ce to your computer and use it in GitHub Desktop.
<?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