且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Facebook 请求对话框未向收件人显示消息

更新时间:2022-04-09 00:33:17

如果在FB.ui方法中传递new_style_message"参数,可以更改通知中的消息.这将更改通知的格式:

You can change the message in the notification if you pass the "new_style_message" parameter in the FB.ui method. This will change the format of the notification from:

$name 在 $app 中向您发送了一个请求

$name $app 中的 $message

使用此参数传递自定义消息字段时,您被限制为一定数量的字符,title 参数将被忽略(对于通知,它仍会显示在游戏/应用页面上),并且您不能更改in $app"后缀,因此您的消息需要是一个短句片段:

When passing a custom message field using this parameter you are limited to a certain number of characters, the title parameter is ignored (for the notification, it will still show on the games/apps page), and you cannot change the "in $app" suffix so your message will need to be a short sentence fragment:

FB.ui({
    method: 'apprequests',
    message: 'sent you an awesome request'
    new_style_message: true
});

请注意,这是一个未记录的功能;官方支持可能不可靠,将来可能会在没有警告的情况下发生变化.

Note that this is an undocumented feature; official support might be unreliable and it may change in the future without warning.