Google+登录按钮与PhoneGap [英] Google+ SignIn Button with PhoneGap

查看:174
本文介绍了Google+登录按钮与PhoneGap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何使用JS Google+登入按钮与Phonegap?专门为iOS?
我发现这篇文章在做oauth与phonegap和childbrowser插件,但我不知道这种方法将使用Google+登录按钮。任何想法?

How can we use the JS Google+ Signin button with Phonegap? Specifically for iOS? I have found this article on doing oauth with phonegap and the childbrowser plugin however I'm not sure that approach will work with the Google+ signin button. Any Ideas?

推荐答案

Google+登录按钮不适用于PhoneGap,因为Phonegap如何提供内容它被视为file://),并导致一些问题与按钮本身或API控制台配置相关。

The Google+ Sign-In button won't work for you in PhoneGap because of how Phonegap serves content (basically its treated as file://) and that leads to a few problems that relate to either the button itself or to the API Console config.

做是为PhoneGap使用OAuth插件,并将您的phonegap应用程序作为已安装的应用程序。我通过以下教程快速浏览了一下,它似乎是一个准确的设置和过程:

What you'll want to do is to use an OAuth plugin for PhoneGap and treat your phonegap app as an "Installed application." I did a quick glance through the following tutorial and it appears to be an accurate set up and process:

http://www.itsalif.info/content/oauth-google-api-gapi-phonegap-childbrowser-jquery

您仍然可以请求Google+登录范围( https://www.googleapis.com/auth/plus.login ),并利用大多数新的Google+功能。

You can still request the Google+ Sign-In scope (https://www.googleapis.com/auth/plus.login) with this approach and take advantage of most of the new Google+ features.

我会有兴趣了解您是否能使用这项功能,如果您成功,请稍后再说。

I will be interested to learn if you get this working, so please comment later if you are successful.

这篇关于Google+登录按钮与PhoneGap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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