我想从我从Javascript for google plus

时间:2015-06-16 09:15:19

标签: javascript ruby-on-rails google-plus google-oauth

我的代码看起来像这样。任何人都可以提供帮助

 PLUS_LOGIN_SCOPE = 'https://www.googleapis.com/auth/plus.login'
 $credentials = Google::APIClient::ClientSecrets.load
 $authorization = Signet::OAuth2::Client.new(
 :authorization_uri => $credentials.authorization_ur
 :token_credential_uri => $credentials.token_credential_uri
 :client_id => $credentials.client_id
 :client_secret => $credentials.client_secret
 :redirect_uri => $credentials.redirect_uris.first
 :scope => PLUS_LOGIN_SCOPE)
 $client = Google::APIClient.new
 $authorization.code = request.headers["HTTP_AUTHORIZATION"]

我在此行中收到错误

 $authorization.fetch_access_token!

   Signet::AuthorizationError: Authorization failed.  Server  message:
   {
       "error" : "deleted_client",
       "error_description" : "The OAuth client was deleted."
   }

0 个答案:

没有答案