gpt4 book ai didi

Facebook - 发布到多个 friend 墙

转载 作者:行者123 更新时间:2023-11-30 05:27:52 25 4
gpt4 key购买 nike

我正在使用 Javascript SDK 将内容发布到用户 friend 墙上:

var publish = 

{
method: 'stream.publish',
message: 'Some kind of test',
uid: uid,
target_id: friendID,
attachment: {
name: 'Test',
caption: 'Facebook API Test',
description: ('Sure hope it worked!'),
href: 'http://www.test.com/',
media: [
{
type: 'image',
href: 'http://test.com/',
src: 'http://test.com/image.jpg'
}
]
},
action_links: [
{ text: 'Enigma Marketing', href: 'http://www.test.com/' }
],
user_prompt_message: 'Share your thoughts about test'
};

FB.ui(publish);
return false;

它工作正常,但我想知道是否有一种方法可以将我发布到多个 friend 墙上?我注意到 pop 在少数列表中显示了一个目标 friend ,因此似乎可以将帖子发布给多个用户。我在文档中找不到任何内容,非常感谢任何帮助。

最佳答案

不可以,您不能在一次通话中向多个好友流发布消息。

最好的方法可能是在服务器端,这样用户就不会收到多个提示。请注意,这通常是不鼓励的,因为它可能被视为垃圾邮件。

使用您的代码,您可以只循环发送事件部分:

var publish = 

{
method: 'stream.publish',
message: 'Some kind of test',
uid: uid,
attachment: {
name: 'Test',
caption: 'Facebook API Test',
description: ('Sure hope it worked!'),
href: 'http://www.test.com/',
media: [
{
type: 'image',
href: 'http://test.com/',
src: 'http://test.com/image.jpg'
}
]
},
action_links: [
{ text: 'Enigma Marketing', href: 'http://www.test.com/' }
],
user_prompt_message: 'Share your thoughts about test'
};

publish.target_id = friendID;
FB.ui(publish);

publish.target_id = friendID;
FB.ui(publish);

return false;

关于Facebook - 发布到多个 friend 墙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4345467/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com