HelloJS + Cordova:与redirect_uri的麻烦 [英] HelloJS + Cordova: Trouble with redirect_uri

查看:324
本文介绍了HelloJS + Cordova:与redirect_uri的麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用HelloJS和Google+ API时遇到问题。它已经运行良好使用本地开发服务器,但当我尝试使用它包裹在Cordova应用程序,我收到一个错误。

I'm having some trouble using HelloJS with the Google+ API. It has been running nicely using a local development server, but when I try using it wrapped in a Cordova application, I'm getting an error.

在Google开发控制台中,我为网络应用程序创建了一个客户端ID。
设置如下:

Within the Google Development Console I've created a client id for web applications. The settings have been set as below;


在我的手机上,我得到一个400错误无效参数redirect_uri:缺少权限:文件: //android_asset/www/index.html

On my phone I get a 400 Error "Invalid parameter for redirect_uri: Missing authority: file:///android_asset/www/index.html"

有关如何解决这个问题的任何建议吗?

Any suggestions on how to solve this?

推荐答案

显式设置

 hello.init( clientIds, {redirect_uri:'http://localhost/'})

这篇关于HelloJS + Cordova:与redirect_uri的麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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