Skip to content

Instantly share code, notes, and snippets.

@emrahuyanik
Last active August 29, 2015 14:08
Show Gist options
  • Save emrahuyanik/4ee2393b9a0eaaba0f50 to your computer and use it in GitHub Desktop.
Save emrahuyanik/4ee2393b9a0eaaba0f50 to your computer and use it in GitHub Desktop.
<?php
ini_set('display_errors', 1);
require_once('TwitterAPIExchange.php');
$settings = array(
'oauth_access_token' => "xxx",
'oauth_access_token_secret' => "xxx",
'consumer_key' => "xxx",
'consumer_secret' => "xxx"
);
$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
$getfield = '?screen_name=username';
$requestMethod = 'GET';
$twitter = new TwitterAPIExchange($settings);
echo $twitter->setGetfield($getfield)
->buildOauth($url, $requestMethod)
->performRequest();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment