jrconlin/oauthsimple — Issue #15: Can't get user access token
Author: banane
Created: 2012-02-16 07:33:37+00:00
State: open

Hi-- trying to use this library to get the user's access token, and i keep getting a 401, Invalid Signature. Any tips? This is the code from the callback.

```php

$oauth_token = $_REQUEST['oauth_token'];
// oauth-token-secret I store in the database from the result of the previous page's call
$shared_secret = $consumer_secret."&".$oath_token_secret;

$params = Array(
'v'=>'2.0',
'output'=>'json',
'oauth_token'=>$oauth_token
);
$path="http://api.netflix.com/oauth/access_token";
try{
$signed = $oauth->sign(
Array('path'=>$path,
'parameters'=>$params,
'signatures'=>Array('consumer_key'=>$consumer_key,'shared_secret'=>$shared_secret)
));
} Catch (Exception $e){
echo $e;
}
```