I'm trying to use this module to get a list of venues, given some coordinates.
My code is:
$fsObj = foursquare_get_object();
$fsObj->useSSL(true);
$fsObj->useApiVersion('v2');
$fs_venues = $fsObj->get('/venues/search', array('ll' => $latitude . "," . $longitude, 'intent' => 'checkin', 'radius' => 1000));
When run, I get an error: "OAuth token invalid or revoked"
I know I didn't call foursquare_get_object() with the uid of the user, but in the documentation at https://developer.foursquare.com/docs/venues/search they say: " If authenticated, the method will return venue metadata related to you and your friends. If you do not authenticate, you will not get this data."
What am I doing wrong?
Comments
Comment #1
mottolini commentedI made it works, but I had to hack the EpiFoursquare.php file.
The code has to be:
I had to add client_id and client_secret parameters beacuse these are required when you don't make an oauth call on behalf of a real Foursquare user. Also I had to use get_basic function instead of get. The problem is that get_basic completely ignores settings made with useSSL and useApiVersion, making in fact only v1 calls without ssl. To make it works, you have to change line 119 of EpiFoursquare.php into:
Comment #2
mottolini commentedAnd here is the patch, which solves the issue #927850 as well.
Comment #3
mottolini commented