setLocations

45 views
Skip to first unread message

Colin

unread,
Feb 17, 2015, 4:59:38 PM2/17/15
to 140dev-twitt...@googlegroups.com
I like to get tweets by locations(e.g, new york city)


I added this line into get_tweets.php

 $stream->setLocations(array(
       array(-74,40,-73,418),
    ));


I also tried this line
 
$stream->setLocations(array('New York City'));


None is working, the program is still getting all tweets from everywhere.

can anyone help me?



 

Iris Wu

unread,
May 17, 2016, 8:32:54 PM5/17/16
to 140dev Twitter Framework
Hi Colin,
Did you figure out how this work?

在 2015年2月18日星期三 UTC+10上午7:59:38,Colin写道:

Nick Giacobe

unread,
Jul 12, 2016, 1:17:06 PM7/12/16
to 140dev Twitter Framework
It looks like you have the location information set incorrectly.  I'm not sure what longitude 418 means.

I'm using (successfully) the following:

$stream->setLocationsByCircle (array (
        array (-75.165765, 39.946842, 100)
));

Also, Twitter seems to give me tweets near what it thinks I want as well as the ones I asked for.
Reply all
Reply to author
Forward
0 new messages