Facebook javascript sdk in Phonegap with ios?
Facebook javascript sdk in Phonegap with ios?
这是我的代码
<html>
<head>
<head>
<title></title>
<script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script>
<script type="text/javascript">
function go()
{
FB.login(function(response) {
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
console.log('Good to see you, ' + response.name + '.');
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
});
}
</script>
<body>
<div id="fb-root">
</div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '', // App ID
channelUrl : '', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
oauth : true //oauth v2.0
});
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<input onclick="go();" type='submit' id='login-button' value='Login' name='login' >
</body>
</html>
基本上,您单击该按钮,它应该向您显示一个登录弹出窗口。当我在普通浏览器中尝试时它可以工作,但是当我在iPhone模拟器中尝试时没有任何反应。Iv 还将 iPhone 浏览器设置为允许弹出窗口。我做错了什么?
我使用名为Childbrowser :)的phonegap插件让它工作
相关文章:
- Fighting with FRP
- issue with FB.Event.subscribe
- 如何确定javascript已经完成了某些操作.ios上的
- 压缩phonegap中ios的图像插件
- geolocation-marker.js conflict with markerclusterer.js
- React Native通过Navigator将用户输入数据传递到选项卡栏IOS中的组件
- Angular 2.0 with JavaScript or TypeScript?
- 如何在iOS应用程序中从Firebase中删除超过6小时的数据
- 为什么不推荐使用“with”?是否有更好或其他方法可以“下降”到对象的命名空间
- WebComponentsJS with IE10
- 是否可以使用iframe API在iOS浏览器上播放youtube视频
- 指令的模板必须只有一个根元素:With restrict E&替换true
- iOS 中的按钮触摸状态
- 在iOS 4.3中未调用UIWebView shouldStartLoadWithRequest
- 在iOS和Android上使用React native时,我还能使用本机第三方lirbraries吗
- timeago.js with datatable and PHP
- Phonegap iOS with Jquery Click events
- IndexedDB with iOS 8/野生动物园
- Facebook javascript sdk in Phonegap with ios?
- iOS implemention of "window.setTimeout" with Javas