Closed Mendi33 closed 9 years ago
You are overwriting variables with different value types. $access_token
starts as the oauth_token
string from the session but when you make the oauth/access_token
request you set the value to the response which is an object.
$access_token = $_SESSION['oauth_token'];
$access_token_secret = $_SESSION['oauth_token_secret'];
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token, $access_token_secret);
$access_token = $connection->oauth("oauth/access_token", array("oauth_verifier" => $_GET['oauth_verifier']));
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token, $access_token_secret);
You should be better with variable names but in short change the last line to this:
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
... gooood. Waiting for the week end to refuel. Thanks ;)
Hi, after getting user's authorization, here's my callback page :
Then, every request i make like :
returns me a Fatal Error : Arrays not supported in headers
Here it is in full text :
I don't understand this one ! Any thoughts ??