简体   繁体   English

Android Google+授权

[英]android google+ authorization

I am trying to loggin to my app via google+ on device without google play services. 我正在尝试在没有Google Play服务的设备上通过Google+登录到我的应用程序。 I use org.scribe.oauth to do this. 我使用org.scribe.oauth来做到这一点。 I create OAuthService and call method getRequestToken() . 我创建OAuthService并调用方法getRequestToken() As responce i see Response body is incorrect. Can't extract token and secret from this: 'Consumer is not registered 作为响应,我看到Response body is incorrect. Can't extract token and secret from this: 'Consumer is not registered Response body is incorrect. Can't extract token and secret from this: 'Consumer is not registered . Response body is incorrect. Can't extract token and secret from this: 'Consumer is not registered But I register my app on developer console. 但是我在开发者控制台上注册了我的应用程序。 What i do wrong? 我做错了什么? How should i register my app? 我应该如何注册我的应用程序? Like Android application or I should choose Installed->Other item when I trying to get api key and secret. 像Android应用程序一样,当我尝试获取api密钥和密码时,应该选择Installed->Other项目。

To create an API key: 要创建API密钥:

  1. Go to the Google Developers Console . 转到Google Developers Console
  2. Create or select a project. 创建或选择一个项目。
  3. In the sidebar on the left, select APIs & auth. 在左侧的边栏中,选择API和身份验证。
  4. In the displayed list of APIs, find the Google+ API and set its status to ON. 在显示的API列表中,找到Google+ API并将其状态设置为“开启”。
  5. In the sidebar on the left, select Credentials. 在左侧的边栏中,选择“凭据”。
  6. Create an API key by clicking Create New Key. 通过单击创建新密钥来创建API密钥。 Select the appropriate kind of key: Server key, Browser key, Android key, or iOS key. 选择适当的密钥类型:服务器密钥,浏览器密钥,Android密钥或iOS密钥。 Then click Create. 然后单击创建。

For more details, please refer here . 有关更多详细信息,请参阅此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM