0
我正在使用考拉发布到用户的墙上。但是帖子在我的FB测试用户的墙上显示了两次。考拉宝石发布两次到Facebook?
的事情是,当我删除所创建的两个相同的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删除第一复制信息,并显示第二条消息只有一个副本,如预期...
没什么大不了的,但将是很好的解决这个问题。