I fixed it on my server. Just use:
access_type=offline approval_prompt=force Access_type=offline alone doesn't work for some reason, you need both. Maybe it's only because I already allowed the application without it and tested after with access_type=offline... If you want to be sure it's retro compatible then use approval_prompt=force. Ciao, Francis On Dec 23 2011, 9:10 am, Владимир Грузинцев <[email protected]> wrote: > Hello! > Any news? > > I am still not getting the refresh token. Of course I trying > usehttps://code.google.com/oauthplayground/and getting refresh token, > but in my application not geting. > > $ch = curl_init(); > curl_setopt($ch, CURLOPT_POST, true); > curl_setopt($ch, CURLOPT_URL, 'https://accounts.google.com/o/oauth2/ > token'); > $headers = array( > 'Content-Type' => 'application/x-www-form-urlencoded', > 'Host' => 'accounts.google.com' > ); > curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); > curl_setopt($ch, CURLOPT_HEADER, 0); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); > $args = array('code' => $code, > 'client_id' => $OAuthConfig['client_id'], > 'client_secret' => $OAuthConfig['client_secret'], > 'redirect_uri' => $baseDir . 'picasa_callback', > 'grant_type' => 'authorization_code' > ); > curl_setopt($ch, CURLOPT_POSTFIELDS, $args); > $result = curl_exec($ch); > curl_close($ch); > var_dump($result); > > response: > > string(128) "{ > "access_token" : > "ya29.AHES6ZT1b1E7hAv6eeTmdWFVcolUt-6EZ59n6MKoDm4JUmdf", > "token_type" : "Bearer", > "expires_in" : 3600 > > > > > > > > }" -- You received this message because you are subscribed to the Google Groups "Google Picasa Web Albums API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-picasa-data-api?hl=en.
