强制 Twitter Epi 库发布状态更新,即使它是上一条推文的副本


Forcing the Twitter Epi Library to post a status update even if it's a duplicate of the last tweet

我正在使用来自以下位置的 epi libs: https://github.com/jmathai/twitter-async/

在尝试发布 Twitter 更新时,我遇到了一个问题,如果推文之前已经出错,我希望它再次发布并忽略它是重复的事实。

我以为代码$twitter->post_statusesUpdate(array('status' => $tweet));每次都会强行发布推文,但这不适合我:/

任何人都知道为什么或可以给我一些工作代码的示例/可以为我解决这个问题?

这是我的代码截图的副本:

try {
    $twitter->post_statusesUpdate(array('status' => $tweet));
} catch (EpiTwitterForbiddenException $e) {
    $msg = json_decode($e->getMessage());
    if ($msg->error != 'Status is a duplicate.') {
    //throw $e;
    }
}

提前致谢- 海弗莱克斯

我希望它再次发布它并忽略它是重复的事实。

这还不可能,你不能两次发布相同的推文,这是推特功能,看:https://dev.twitter.com/discussions/3714