Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Twitter API (Abraham's) - Could not authenticate issue
    text
    copied!<p>I am having some problems with implementing the twitter api. I am using <a href="https://github.com/abraham/twitteroauth" rel="nofollow">Abraham's method</a> to connect to Twitter but I get this error:</p> <pre><code>object(stdClass)#25 (2) { ["error"]=&gt; string(27) "Could not authenticate you." ["request"]=&gt; string(302) "/1/account/verify_credentials.json?oauth_consumer_key=79CrBl2oYlaATF7YOn0New&amp;oauth_nonce=014df8945398b9605b78703829f93c45&amp;oauth_signature=7OnRBeraaGxXgLbTNQ3%2BFdMAIPs%3D&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1314776180&amp;oauth_token=U7iPIyqv7IJyq1VkvKsf06KE6KQOtVDPBEwwqRjhg&amp;oauth_version=1.0" } </code></pre> <p>This is my code:</p> <pre><code>$to = new TwitterOAuth(); $tok = $to-&gt;getRequestToken(CURRURL); $request_link = $to-&gt;getAuthorizeURL($tok); $_SESSION['oauth_access_token']= $tok['oauth_token']; $_SESSION['oauth_access_token_secret'] = $tok['oauth_token_secret']; if ((!isset($_SESSION['oauth_access_token'])) || ($_SESSION['oauth_access_token'])=='') { $to = new TwitterOAuth($_SESSION['oauth_access_token'], $_SESSION['oauth_request_token_secret']); $token_credentials = $to-&gt;getAccessToken($_REQUEST['oauth_verifier']); $_SESSION['oauth_access_token'] =$token_credentials['oauth_token']; $_SESSION['oauth_access_token_secret'] = $token_credentials['oauth_token_secret']; } else { $connection = new TwitterOAuth($access_token['oauth_token'], $access_token['oauth_token_secret']); $user_info = $to-&gt;get('account/verify_credentials'); //die(var_dump($user_info)); $data = array( "twitter" =&gt; array( "oauth_provider" =&gt; "twitter", "oauth_uid" =&gt; $user_info-&gt;id, "first_name" =&gt; $user_info-&gt;name, "last_name" =&gt; "", "username" =&gt; $user_info-&gt;screen_name, "email" =&gt; "", "gender" =&gt; "", "hometown" =&gt; "", "location" =&gt; $user_info-&gt;location ) ); array_push($social,$data); } </code></pre> <p>I have been banging my head to the wall over this, so any suggestions would greatly be appreciated!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload