[英]Facebook apprequest blank app page
I'm trying to send app requests to users. 我正在尝试将应用程序请求发送给用户。
I set up 'Canvas URL' and 'Secure Canvas URL' (certificate for this page is self-signed) as my site home page. 我将“画布URL”和“安全画布URL”(此页面的证书是自签名的)设置为我的网站主页。
My js code: 我的js代码:
function do_facebook_login() {
FB.login(function(response) {
if (response.authResponse) {
FB.ui({
method: 'apprequests',
message: 'message',
data: '{"inviter_id":"some_text"}'
}, requestCallback);
}
}, {scope: 'email,user_birthday'});
}
User successfully send requests. 用户成功发送请求。 When invited user clicks on request message - opens page with my 'Secure Canvas URL' but I don't get 'request_ids' (actually I don't get any variables in $_GET array).
当受邀用户单击请求消息时-打开带有“安全画布URL”的页面,但没有得到“ request_ids”(实际上,在$ _GET数组中没有得到任何变量)。 Also sometimes I get blank page in iframe (it's happens randomly, can not specify in which cases).
也有时我在iframe中得到空白页(它是随机发生的,无法指定在哪种情况下)。
Any idea why this can happen? 知道为什么会发生这种情况吗?
尝试使用$_REQUEST
而不是$_GET
来获取画布中的参数。
Well, I found what the problem was: one of plugins had this code: 好吧,我发现了问题所在:其中一个插件具有以下代码:
if (isset($_GET['ref'])) {
// do something
// redirect to home page
}
and facebook app requests have $_GET['ref'] 和Facebook应用请求中有$ _GET ['ref']
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.