简体   繁体   English

Facebook登录,重定向到服务器然后是应用

[英]Facebook login, redirect to server then app

I'm trying to login via FB in my app (written using jQuery Mobile and wrapped with phonegap build). 我正在尝试通过FB在我的应用程序中登录(使用jQuery Mobile编写并用phonegap构建包装)。 When I click on the link the app opens 当我单击链接时,应用程序打开

myserver.com/login myserver.com/login

At this point the server (python) calls FB login function. 此时,服务器(python)调用FB登录功能。 Once the user has logged in FB will redirect to my server again, where I'll do some stuff. 用户登录后,FB将再次重定向到我的服务器,在那我将做一些事情。

Now, how can I redirect from my server back to my app? 现在,如何从服务器重定向回我的应用程序? I tried to pass 我试图通过

document.URL

to the server and redirect there but my phone says I don't have permission to acces file://android_asset/www/index.html 到服务器并重定向到该服务器,但是我的手机说我没有访问file://android_asset/www/index.html的权限

Thanks to anyone who is willing/able to help. 感谢任何愿意/能够提供帮助的人。

Solved using childbrowser plugin. 使用childbrowser插件解决。

In phonegap build 在phonegap构建中

https://build.phonegap.com/docs/plugins https://build.phonegap.com/docs/plugins

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

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