始终从默认和引用转发中确定@useraccount

时间:2018-03-29 19:45:41

标签: php api twitter

我正在构建一个php cli脚本来从已知的用户列表中检索推文,以确定他们是否从一个@useraccount转发了推文。使用user_timeline api访问器我已经确定有两种类型的转发,默认和引用。

默认转推具有以下属性:

$result[0]->text: "RT @useraccount"

$result[0]->retweeted_status: "Some cool text goes here..."

但引用的转发有这些属性:

$result[0]->text: "Gonna be wicked awesome ya'll <shortened twitter url>"

$result[0]->quoted_status = "This epic fundraising event happens every year!"

正如您所看到的,可以很容易地从默认转推中推断@useraccount,因为它是直接引用的。但在引用的转发中,文本中没有提到@useraccount,或者它的属性。

这是我正在使用的post params:

$result = $twitterOAuth->get('statuses/user_timeline', ['exclude_replies' => true, 'screen_name' => $username, 'trim_user' => true]);

之前有没有遇到过这个?如果是这样,你的解决方案是什么?

0 个答案:

没有答案