Using the Foursquare API to find nearby places



I am attempting to use the Foursquare API to find nearby places after not having much luck with the Google Maps Key.

I’m using the below from Cityforks after adding the relevant Cordova API to get the current location which works like a dream:

Meteor.startup(function() {

success = function(position) {
Session.set(‘location’, position);
debugger‘fetchNearbyLocations’, position.coords)

I also have this in a client folder:

Foursquare = {
find: function(options, callback) {‘foursquare-search’, options, function(error, data) {
callback(error, data);

And this on the server:

if (Meteor.isServer) {
checkFoursquare: function (params) {
var url = “”;
params.client_id = ID Inserted here;
params.client_secret = Secret inserted here;

        return"GET", url, {data: params});


What I’m wanting to do is have a selection of various places, e.g. restaurant, nightclub, etc. in the html, within a 100km radius from current location and when a user specifies the type of venue, the results upload to a Mongo collection (no displaying on a map necessary)