gpt4 book ai didi

javascript - Facebook 应用程序 : auto-publish post to wall

转载 作者:行者123 更新时间:2023-11-30 09:01:18 25 4
gpt4 key购买 nike

我有一个 facebook 应用程序并试图将帖子发布到用户的墙上,而不用任何类型的弹出对话框通知用户(因为用户已经授予 publish_stream oauth 权限)。

我一直在搜索很多东西,并尝试了很多不同的东西,使用了 FB.ui 或 FB.api,但我无法让它正常工作,我要么收到弹出通知,要么什么都没有.

按照答案 here ,我有这段代码,但它什么都不做,它只是提醒“未定义”(因为帖子没有发布,没有 post_id)

var publish = {
method: 'stream.publish',
message: 'Test Message',
picture : 'http://www.mydomain.gr/apps/app1/img/small.png',
link : 'http://www.mydomain.gr/apps/app1/',
name: 'THIS IS MY APPLICATION!',
caption: ' ',
description: 'I just used this app and i loved it!!',
actions : { name : 'Use me!', link : 'http://www.mydomain.gr/apps/app1/'}
};

FB.api('/me/feed', 'POST', publish, function(response) {
alert(responce.post_id)
});

有什么办法可以实现吗?提前致谢。

最佳答案

您的行为违反了 Facebook 规则!

您要发布到用户墙上的每条消息都必须首先被用户看到并获得批准。阅读 Facebook platform policy并注意Section IV paragraph 3。

关于javascript - Facebook 应用程序 : auto-publish post to wall,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9098784/

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