I'm getting the following error:
I'm using artdarek's oauth-4-laravel but there doesn't seem to be much support in the Issues area.
My code is as follows:
public function tumblrLogin()
{
$oauth_token = Input::get( 'oauth_token' );
$oauth_verifier = Input::get( 'oauth_verifier' );
$tumblr = OAuth::consumer('Tumblr', 'http://30daychallenges.net/auth/tumblr/');
if ( !empty( $oauth_token ) && !empty( $oauth_verifier ) )
{
$token = $tumblr->retrieveAccessToken('Tumblr');
$tumblr->requestAccessToken( $oauth_token, $oauth_verifier, $token->getRequestTokenSecret() );
$result = json_decode( $tumblr->request('user/info'), true );
dd($result);
}
else
{
// get request token
$token = $tumblr->requestRequestToken();
// get Authorization Uri sending the request token
$url = $tumblr->getAuthorizationUri(array('oauth_token' => $token->getRequestToken()));
return Redirect::to( (string)$url );
}
}
The error looks like it's coming from
$token = $tumblr->requestRequestToken();
But I can't see why - anyone experienced this error before?