facebook贴墙弹出,替换“写点东西”

facebook Post to Wall Popup, replace "Write something...."

本文关键字:写点东西 替换 facebook      更新时间:2023-09-26

我在用户墙上发布消息使用fb "Post to your wall"弹出,它显示文本区域,用户可以写消息,我想把自定义文本在文本区域,现在它有一个水印说"写东西…",我需要替换它。

我正在使用这个代码:

function streamPublish(_message){
    FB.ui({
                    method: 'stream.publish',
                    message: 'this is a test message',
         },
    function(response) {
    });
}

谢谢

现在我相信你可以使用:

user_message_prompt: 'Custom prompt'

所以你的代码变成了:

function streamPublish(_message){
    FB.ui({
                    method: 'stream.publish',
                    message: 'this is a test message',
                    user_message_prompt: 'Custom prompt'
         },
    function(response) {
    });
}

(来源:http://fbdevwiki.com/wiki/FB.ui)

但是要注意,这是不推荐的,并且新API将不支持:

https://developers.facebook.com/docs/reference/dialogs/feed/

如果他们允许我们这样做,Facebook将失去墙的重要性。