Facebook的喜欢按钮Apahe科尔多瓦/ PhoneGap的应用 [英] Facebook like button on Apahe Cordova/Phonegap app

查看:151
本文介绍了Facebook的喜欢按钮Apahe科尔多瓦/ PhoneGap的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经插入像这样的方法,如一个简单的网页按钮Facebook的:
https://developers.facebook.com/docs/plugins/like-button

I have inserted a facebook like button with this methods like a simple web: https://developers.facebook.com/docs/plugins/like-button

不过,第一次一个按钮是pressed登录窗口中打开。此窗口在当前窗打开,而不是在一个新的窗口。该窗口中的用户登录后尝试关闭本身,但它不能。一个白色的窗口显示。
今后一段时期,因为用户登录的按钮一样正常工作。

But the first time that a button is pressed a login window opens. This window opens in the current window, not in a new window. After the user logs in the window try to close itself but it can't. A white window is showed. Next times the like button works correctly because the user is logged in.

我也尝试用科尔多瓦插件的PhoneGap,Facebook的插件来实现,但它没有像按钮的支持。
https://github.com/phonegap/phonegap-facebook-plugin

I also try to implement with the cordova plugin "phonegap-facebook-plugin" but it doesn't have support for like button. https://github.com/phonegap/phonegap-facebook-plugin

推荐答案

我觉得你要听时,他们已经完成了登录并重定向回你的应用程序有的像的this

I think you need to listen to when they've finished logging in and redirect back to you're application some like this.

只有 window.location的设置为类似文件:///android_asset/www/index.html 或者你想给用户返回到任何网页。

Only with window.location set to something like file:///android_asset/www/index.html or whatever page you want to return the user to.

< FB:登录按钮onlogin =document.location.href ='文件:///android_asset/www/index.html';>
< / FB:登录按钮>

像这样的事情,但对于类似按钮?

Something like this but for the like button ?

这篇关于Facebook的喜欢按钮Apahe科尔多瓦/ PhoneGap的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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