Tag: gdata

获取刷新令牌谷歌API

我无法使用我的代码获取我的刷新标记。 我只能得到我的访问令牌,令牌types等,我已经按照我的loginurlaccess_type =离线一些教程 echo "<a href='https://accounts.google.com/o/oauth2/auth?" . "access_type=offline&client_id=123345555.apps.googleusercontent.com& " . "scope=https://www.googleapis.com/auth/calendar+https://www.googleapis.com/auth/plus.me&response_type=code& " . "redirect_uri=http://www.sample.com/sample.php&state=/profile'>Google</a>"; 和我的领域获取访问令牌 $fields=array( 'code'=> urlencode($authcode), 'client_id'=> urlencode($clientid), 'client_secret'=> urlencode($clientsecret), 'redirect_uri'=> urlencode($redirecturi), 'grant_type'=> 'authorization_code', ); 但我无法获取refresh_token,只有access_token,token_type,id_token和expires_in。

Android的java.lang.VerifyError?

在我的Android应用程序中,我总是得到VerifyErrors! 我不明白为什么。 每当我包含一个外部JAR时,当我尝试启动我的应用程序时,我总是得到VerifyErrors(除了一次,当我包含Apache Log4j时)。 我通常通过获取库的源代码并将其添加到我的项目中来解决这个问题,但是我正在尝试使用GData客户端库( http://code.google.com/p/gdata-java-client/ )。 我可以得到这个来源,但它的依赖(mail.jar,activation.jar,servlet-api.jar)我不能,所以我得到validation错误。 我想一劳永逸地解决这个问题的根源。 我在网上查看,但是他们似乎都在谈论不完整的课程档案? 这我不知道。

未收到Google OAuth刷新令牌

我想从Google获取访问令牌。 Google API说要获取访问令牌,将代码和其他参数发送到令牌生成页面,并且响应将是一个JSON对象,如: { "access_token" : "ya29.AHES6ZTtm7SuokEB-RGtbBty9IIlNiP9-eNMMQKtXdMP3sfjL1Fc", "token_type" : "Bearer", "expires_in" : 3600, "refresh_token" : "1/HKSmLFXzqP0leUihZp2xUt3-5wkU7Gmu2Os_eBnzw74" } 但是,我没有收到刷新令牌。 我的这个回应是: { "access_token" : "ya29.sddsdsdsdsds_h9v_nF0IR7XcwDK8XFB2EbvtxmgvB-4oZ8oU", "token_type" : "Bearer", "expires_in" : 3600 }