Replies: 2 comments 1 reply
-
The problem is the resulting rule: If you pass ['user1','user2', ...] the resulting rule is: from:user1 from:user2 without operator, and the documentation say Matches any Tweet from a specific user. You can only pass a single username/ID from: operator. Example: from:twitterdev OR from:twitterapi -from:twitter https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe you can do something like this change: public function whenTweets(string | array $twitterUserIds, callable $whenTweets): self
{
$i = 0;
if (is_array($twitterUserIds)) {
foreach ($twitterUserIds as $id) {
$i++;
if ($i > 1) {
$this->rule->or();
}
$this->rule->from($id);
}
}
else {
$this->rule->from($twitterUserIds);
}
$this->onTweet = $whenTweets;
return $this;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions