Closed okrauth closed 5 years ago
Hi @okrauth,
As outlined in Twitter’s Standard search API docs, you may send your desired latitude and longitude coordinates as a comma-separated value in the geocode
parameter.
Take a look at this sample code:
require_once 'src/codebird.php';
\Codebird\Codebird::setConsumerKey('Your-consumer-key', 'Your-consumer-secret');
$cb = \Codebird\Codebird::getInstance();
$cb->setToken("Your-token", "Your-secret");
$reply = $cb->search_tweets([
'geocode' => '53.8251523,-1.6265369,3mi'
]);
var_dump($reply);
The 53.82...
value is the latitude, -1.62...
stands for the longitude, and the third parameter contains the radius from this point (in either km
or mi
).
Hope this helps?
@okrauth Did you have time to try the code above?
Closing since there were no further replies.
I am testing the library. Is there a way to send a geo location search request using only the Application-only auth? How do I submit the lat lon param?
thanks!