Created
December 9, 2014 22:24
-
-
Save naeluh/e77b9d18697ecd036988 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
require 'vendor/TwitterAPIExchange.php'; | |
$settings = array( | |
'oauth_access_token' => "", | |
'oauth_access_token_secret' => "", | |
'consumer_key' => "", | |
'consumer_secret' => "" | |
); | |
$url = "https://api.twitter.com/1.1/statuses/update.json"; | |
$postfields = array('status' => 'test'); | |
$requestMethod = 'POST'; | |
$twitter = new TwitterAPIExchange($settings); | |
$response = $twitter->buildOauth($url, $requestMethod) | |
->setPostfields($postfields) | |
->performRequest(); | |
echo '<pre style="color:black;">'; | |
var_dump(json_decode($response)); | |
echo '</pre>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment