fennb / phirehose

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

Endpoint of UserStream API has been changed. Ref: https://dev.twitter… #102

Closed samedyildirim closed 8 years ago

samedyildirim commented 8 years ago

Endpoint of UserStream API has been changed. Ref: https://dev.twitter.com/streaming/reference/get/user. Old endpoint (https://userstream.twitter.com/2/) is not working since 2016-05-05 00:00.

juuga commented 8 years ago

I started receiving 404 Not found errors from Twitter, so this truly seems to be the case.

juuga commented 8 years ago

A quick fix: If you define your own consumer, you can make a method that overrides the protected $URL_BASE

class TwitterUserConsumer extends OauthPhirehose
{
    public function correctUserStreamURL()
    {
        $this->URL_BASE = 'https://userstream.twitter.com/1.1/';
        return $this;
    }

Just call this method before you call consume()

fennb commented 8 years ago

Thanks guys, merged!