【发布时间】:2017-03-03 18:02:04
【问题描述】:
我正在使用考拉在用户的墙上发帖。但是帖子在我的 FB 测试用户的墙上显示了两次。
问题是,当我删除创建的两个相同的 FB 帖子之一时,它们都会被删除。所以这似乎是FB端的一个问题。知道为什么个别帖子会在 FB 上出现两次吗?
def post_to_fb
if !fb_shared.present?
token = user.oauth_token
@graph = Koala::Facebook::API.new(token)
result = @graph.put_connections(user.uid, "feed", message: "Test message")
else
return nil
end
end
编辑
此外,如果我再次尝试发布同一条消息,考拉会检测到重复的帖子并阻止它发布:
Koala::Facebook::ClientError: type: OAuthException, code: 506, error_subcode: 1455006, message: Duplicate status message, error_user_title: Duplicate Status Update, error_user_msg: This status update is identical to the last one you posted. Try posting something different, or delete your previous update.
...所以我很确定我的代码/考拉不会发布两次。
编辑 2
事实证明,只有当这是用户的第一个提要帖子时才会发生这种情况。如果我发布另一条消息,FB 会删除第一条重复的消息,并按预期只显示第二条消息的一个副本...
没什么大不了的,但会很高兴解决它。
【问题讨论】:
标签: ruby-on-rails facebook facebook-graph-api koala