artdarek / oauth-4-laravel

OAuth Service Provider for Laravel 4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OAuth 1 setAccessToken does not work

shellprog opened this issue · comments

For OAuth 1 (Bitbucket) it is unable to store access token . I have access token in db , but unable to set it during request .

 $fs = OAuth::consumer('BitBucket');
 $token_interface = new \OAuth\OAuth1\Token\StdOAuth1Token($token);
 $fs->getStorage()->storeAccessToken('BitBucket', $token_interface);
 $result = json_decode($fs->request('user/repositories'));

Result is null , not sure what is wrong .

Help is appreciated .

This worked for me for Twitter, though I did add setting the token secret by doing:

$token_interface->setAccessTokenSecret($token_secret);