Problem with setLocations and current Phirehose library

54 views
Skip to first unread message

Adam Green

unread,
Apr 19, 2013, 7:12:26 AM4/19/13
to phireho...@googlegroups.com
setLocations requests are failing with the current Phirehose and OAuth. This results in a 401 error. This email was sent to my 140dev framework Google Group with a suggested fix. I would prefer that someone familiar with the internals of the Phirehose code check this out and apply the proper patch:

-----------------------------------------------------------------------------------------------------



to 140dev-twitter.
Hi all..

Just finding when using the OAuth mechanism,  the

$stream->setLocations(array(
array(-122.75, 36.8, -121.75, 37.8), // San Francisco
array(-74, 40, -73, 41),             // New York
));

giving "HTTP ERROR 401: Unauthorized"

--

So I inserted these lines in the bottom routine of OauthPhirehose.php

if (count($this->locationBoxes) > 0)
                {
                        $requestParams['locations'] = implode(',', $this->locationBoxes);
                }




Now the setLocations works again.

Fenn

unread,
Jun 10, 2013, 10:18:06 PM6/10/13
to phireho...@googlegroups.com
Thanks to github user @bangpound, this has been fixed in:  https://github.com/fennb/phirehose/commit/a670347c9257f2a3bf3483dfa4822ec242409135

People who require this functionality should upgrade to the latest github master.

  Fenn.
Reply all
Reply to author
Forward
0 new messages