我正在开发一个与 facebook 集成的移动应用程序。该应用程序是使用 jquery mobile 开发的(见下文)
<link rel="stylesheet" <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
到目前为止,我已经设法将 Facebook 功能与 Facebook JSSDK 集成,并且在普通浏览器中一切正常,因为它应该(登录、注销、其他 api 调用),但是当我尝试发送一个 apprequest 时:
function sendRequest() {
FB.ui({ method: 'apprequests', message: 'Are you ready?',
}, function(response) {
console.log('sendRequest response: ', response);
if (response && response.to) {
for (var j = 0; j < response.to.length; j++) {
alert('You have: ' + response.response.name + ' with User id: ' + response.to[j] + ' invited');
//alert(response.to[j]);
}
} else {
console.log('User didn't invite anyone');
}
});
在移动设备上,请求对话框不会弹出。我只看到一个空白的白色屏幕。有谁知道我做错了什么?