谷歌,加上集成的WebView [英] Google plus integration in webview

查看:118
本文介绍了谷歌,加上集成的WebView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我整合谷歌加的机器人。但是,它的工作原理采用原生谷歌加应用程序。 我用这个来创建一个示例项目。 <一href="https://developers.google.com/+/quickstart/android">https://developers.google.com/+/quickstart/android

Currently I integrated google plus in android. But it works using native google plus app. I used this to create a sample project. https://developers.google.com/+/quickstart/android

但我想让用户登录使用web视图,而不是谷歌加本机应用程序。 有没有一种方法来用户就谷歌的Andr​​oid +中的WebView整合?

But I want to let user login using WebView and not the google plus native app. Is there a way to user do google+ integration in WebView in android ?

在此先感谢。

推荐答案

是的,你基本上需要抓住,你可以用它来代表用户进行身份验证操作的访问令牌。

Yes, you'll essentially need to grab an access token that you can use to perform authenticated actions on behalf of the user.

对于一个纯粹的客户端的流量,你有三种选择:

For a purely client-side flow, you have three options:

  • HTML按钮
  • 按钮使用JavaScript渲染
  • 在启动支持JavaScript的登录流程

对于涉及服务器关于这些详细的网络指南和其他流量,结账谷歌的网页登录帮助页

For detailed web guides about these and other flows involving servers, checkout Google's web sign-in help page.

还有一个很好的基础教程 Google+登录功能通过的Andr​​oid的WebView 通过伊恩·巴伯。

There is also a nice basic tutorial for Google+ sign-in via Android WebView by Ian Barber.

如果您需要使用更多Google+的功能超越登陆,考虑仰视了Google+的JavaScript API。

If you need to use more Google+ functionality beyond login, consider looking up the Google+ JavaScript API.

这篇关于谷歌,加上集成的WebView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆