我使用Koala发布给用户'墙壁。但是在我的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会检测到重复的帖子并阻止其发布:
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.
...所以我很确定我的代码/考拉没有发布两次。
事实证明只有当用户的第一个饲料帖时,才会发生这种情况。如果我发布另一条消息,FB会删除第一条重复的消息,并按预期显示第二条消息的一个副本...
没什么大不了的,但很高兴解决它。
答案 0 :(得分:0)
这是Facebook避免垃圾邮件的方式,不会让你多次发布相同的状态,我试着在大约10分钟后测试相同的东西并且它有效,希望这会有所帮助。