I am running WAMP on a Windows 7 machine. I am trying to run a simple query however nothing appears when the below code is run (apart from the h2 text).
I am unsure if the authorisation part is failing or the twitter query.
I have taken the consumer key and secret from the Twitter App API keys screen. To be honest I am not sure if I have the correct oauth codes - I took these from the Test Auth screen within the Twitter App section.
I have tried reading through the documentation however cannot seem to find what I am looking for.
<?php echo "<h2>Simple Twitter API Test</h2>"; /** Authorisation **/ require_once('TwitterAPIExchange.php'); $settings = array( 'oauth_access_token' => "XXXXXXXXXX", 'oauth_access_token_secret' => "XXXXXXXXXX", 'consumer_key' => "XXXXXXXXXX", 'consumer_secret' => "XXXXXXXXXX" ); /** Query **/ $url = 'https://api.twitter.com/1.1/followers/list.json'; $getfield = '?username=MYID_XXXXX&skip_status=1'; $requestMethod = 'GET'; $twitter = new TwitterAPIExchange($settings); echo $twitter->setGetfield($getfield) ->buildOauth($url, $requestMethod) ->performRequest(); ?>