PHP Oauth Client (1.0a & 2.0): App Keeps Asking Authorization -
i new oauth implementation , has been searching web libraries use , have found manuel lemos' oauth client.
anyway, problem have right re-authorization everytime session expires.
i implement oauth project using facebook, twitter, yahoo , google.
i have managed working think lost in point after access token obtained , app has been authorized user.
i encounter issue yahoo, twitter , google (except facebook) wherein when access token (or session) expires , using these "severs" again redirects authorization page , asks user authorize app (again).
what should yahoo, twitter , google authorize once (except on revoked permissions) , when user returns , use again automatically obtain user data without asking authorization again?
here's part of code performs request:
if( ( $success = $client->initialize() ) ) { if( ( $success = $client->process() ) ) { if( strlen( $client->access_token ) ) { $success = $client->callapi( $apiurl , 'get' , $apiqry , array( 'failonaccesserror'=>true ) , $user); } elseif(strlen($client->authorization_error)) { $client->error = $client->authorization_error; $success = false; } } $success = $client->finalize($success); }
i have tried following solutions no luck :(
twitter oauth - checking if access application granted
twitter - have oauth database, how know user is?
twitter api authorization of application
and bunch of others none of them worked..
thank you!
Comments
Post a Comment