fennb / phirehose

PHP interface to Twitter Streaming API
709 stars 189 forks source link

processQueueFile function in ghetto-queue-consume never go into decode line #87

Closed giselajesslim closed 8 years ago

giselajesslim commented 8 years ago

I found out in log that processQueueFile function never decode the tweet if there is more than 1 tweet. Is this because of the tweets in current file not separated with coma? or raw statuses json format is not valid. I want to insert each tweet into my database.

$data = json_decode($rawStatus, true);
if (isset($data) && isset($data['user']['screen_name'])) {
        $this->log('Decoded tweet: ' . $data['user']['screen_name'] . ': ' . urldecode($data['text']));
}
laoman commented 8 years ago

Hey @blaxroze search for issue "fputs bug in ghetto collection? #53" the answer lies there

giselajesslim commented 8 years ago

@laoman Yup thanks. I found out the answer too.

laoman commented 8 years ago

@blaxroze you might be interested about this #96

fennb commented 8 years ago

Would anyone kind like to submit a pull request to change ghetto-queue-collect to append newlines as per #53? You would close 3 issues and be considered a genuine hero :)

laoman commented 8 years ago

@fennb just submitted one

fennb commented 8 years ago

Fixed in 197b7da3d0b63f2de972fb2a14c838feb4f304dc