daily pastebin goal
82%
SHARE
TWEET

Untitled

mcneox Sep 20th, 2014 221 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <?php
  2. ini_set('display_errors', 1);
  3. require_once('TwitterAPIExchange.php');
  4.  
  5. /** Set access tokens here - see: https://dev.twitter.com/apps/ **/
  6. $settings = array(
  7.     'oauth_access_token' => "***",
  8.     'oauth_access_token_secret' => "***",
  9.     'consumer_key' => "***",
  10.     'consumer_secret' => "***"
  11. );
  12.  
  13. /** Perform a GET request and echo the response **/
  14. /** Note: Set the GET field BEFORE calling buildOauth(); **/
  15. $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
  16. $getfield = '?screen_name=mcneox';
  17. $requestMethod = 'GET';
  18.  
  19. $twitter = new TwitterAPIExchange($settings);
  20. var_dump($twitter);
  21. $response = $twitter->setGetfield($getfield)
  22.     ->buildOauth($url, $requestMethod)
  23.     ->performRequest();
  24. var_dump($response);
  25. var_dump(json_decode($response));
  26. echo "<br> Blub?<br>";
  27.  
  28. var_dump($twitter);
  29.  
  30. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Pastebin PRO 'CHRISTMAS SPECIAL'!
Get 60% OFF Pastebin PRO accounts!
 
Top