预览中的Facebook apprequests消息不会显示在Receivents通知栏上。
我正在使用facebook new requests 2.0通过应用程序发送请求。现在,我有一个自定义消息,它在发送邀请时显示在预览中,但是在收件人端,该消息不会显示,而是显示标准消息。请参阅我为此目的使用的以下代码预览中的Facebook apprequests消息不会显示在Receivents通知栏上。,facebook,notifications,apprequests,Facebook,Notifications,Apprequests,我正在使用facebook new requests 2.0通过应用程序发送请求。现在,我有一个自定义消息,它在发送邀请时显示在预览中,但是在收件人端,该消息不会显示,而是显示标准消息。请参阅我为此目的使用的以下代码 <script type="text/javascript" src="https://connect.facebook.net/en_US/all.js"></script> <script type="text/javasc
<script type="text/javascript" src="https://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
FB.init(
{
appId: '<?php echo $this->fbappid; ?>',
status: true,
cookie: true,
oauth: true,
frictionlessRequests: true
});
function sendRequestViaMultiFriendSelector()
{
FB.getLoginStatus(function(response)
{
if (response.status === 'connected')
{
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
FB.ui(
{
method: 'apprequests',
message: 'My Custom Message',
filters: ['all'],
data: '<?php echo $this->application . 'buddies/gifts/' . $this->gift_id ; ?>',
title: 'Send Gifts',
display: 'iframe'
},
function(response)
{
//console.log(response);
if (response && response.to)
{
var idds = response.to.join(',');
$('input[name=ids]').val(idds);
$('#invite').submit();
return false;
} else {
$('#invite_fail').submit();
return false;
}
});
$(document).oneTime(500,'check', function()
{
$(".FB_UI_Dialog").css('width','550px');
});
$(".FB_UI_Dialog").css('width','550px');
}
else if (response.status === 'not_authorized')
{
$('#login_fail').submit();
}
else
{
$('#login_fail').submit();
}
});
}
sendRequestViaMultiFriendSelector();
});
</script>
<?php endif; ?>
$(文档).ready(函数()
{
FB.init(
{
appId:“”,
状态:正确,
曲奇:是的,
真的,
无摩擦要求:正确
});
函数sendRequestViaMultiFriendSelector()
{
FB.getLoginStatus(函数(响应)
{
如果(response.status===“已连接”)
{
var uid=response.authResponse.userID;
var accessToken=response.authResponse.accessToken;
FB.ui(
{
方法:“apprequests”,
消息:“我的自定义消息”,
筛选器:[‘all'],
数据:“”,
标题:"送礼物",,
显示:“iframe”
},
功能(响应)
{
//控制台日志(响应);
if(response&&response.to)
{
var idds=response.to.join(',');
$('input[name=ids]').val(idds);
$('邀请').submit();
返回false;
}否则{
$('invite_fail')。提交();
返回false;
}
});
$(文档).oneTime(500,'check',函数()
{
$(“.FB_UI_Dialog”).css('width','550px');
});
$(“.FB_UI_Dialog”).css('width','550px');
}
else if(response.status===“未授权”)
{
$('#登录失败')。提交();
}
其他的
{
$('#登录失败')。提交();
}
});
}
sendRequestViaMultiFriendSelector();
});
我需要显示这个自定义消息,否则用户会忽略它并认为它是垃圾邮件的巨大机会。p> 事实上,从历史上看,应用程序曾经控制过邮件,而太多邪恶的应用程序占据了它们太多的优势。然后,Facebook重新设计了应用程序,让它们对内容和发送方式的控制更少,理由非常充分。这是新的Requests 2.0版本。现在,当用户不是应用程序用户时,您可以向收件人提供的唯一自定义消息是在“身份验证”对话框或应用程序屏幕上。您好,DMCS,再次感谢您,但请尝试应用程序“”。此应用发送自定义消息。知道他们是怎么做的吗?他们是白名单上的应用程序。他们也是Facebook的合作伙伴。@DMCS,我也对这种能力感兴趣。有没有办法向Facebook申请“白名单”申请状态?是的,你需要让你的公司联系Facebook corporate并了解如何启动该流程。