如何在朋友的Facebook墙上发布消息

2 投票
1 回答
1022 浏览
提问于 2025-04-18 13:03

首先,我尝试给自己的账号发消息,结果成功地发到了我的动态墙上。现在,我想用Python给一个特定朋友的Facebook动态墙发消息,下面是我的代码:

friends = graph.get_object("me/friends")
friends_id = friends['data'][0]['id']
graph.put_object(friends_id,"feed",message="For testing purpose sent from terminal")

当我尝试给朋友发消息时,出现了一个错误:

"facebook.GraphAPIError: (#200) Feed story publishing to other users is disabled for this application"

我试着修复这个错误,但得到的结果是“我们无法发布到朋友的动态”。

1 个回答

0

看起来Facebook在2013年10月2日取消了通过这个特定的API给别人墙上发帖的功能。

如果你想实现类似的功能,可以考虑使用发送对话框

不过,这个方法只是给用户发送消息,而不能在朋友的墙上发帖。

你可以查看这些之前讨论过的问题(在其他标签下):

  1. 这个应用程序无法给其他用户发布动态
  2. 通过“动态”连接使用Graph API给朋友墙上发帖自2013年2月6日起失败

撰写回答