Closed YasharF closed 5 years ago
I know it seems strange, but this fixes the issue:
diff --git a/controllers/api.js b/controllers/api.js
index 009d112..22565d1 100644
--- a/controllers/api.js
+++ b/controllers/api.js
@@ -1,3 +1,4 @@
+
const { promisify } = require('util');
const request = require('request');
const cheerio = require('cheerio');
@@ -13,7 +14,8 @@ const clockwork = require('clockwork')({ key: process.env.CLOCKWORK_KEY });
const paypal = require('paypal-rest-sdk');
const lob = require('lob')(process.env.LOB_KEY);
const ig = require('instagram-node').instagram();
-const { Venues, Users } = require('node-foursquare')({
+require('babel-polyfill');
+const { Venues, Users } = require('node-foursquare').default()({
secrets: {
clientId: process.env.FOURSQUARE_ID,
clientSecret: process.env.FOURSQUARE_SECRET,
diff --git a/package.json b/package.json
index 97f446a..6d7eb77 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
"@fortawesome/fontawesome-free": "^5.2.0",
"@ladjs/bootstrap-social": "^7.0.2",
"@octokit/rest": "^15.9.5",
+ "babel-polyfill": "^6.26.0",
"bcrypt-nodejs": "^0.0.3",
"body-parser": "^1.18.3",
"bootstrap": "^4.1.3",
@@ -42,7 +43,7 @@
"mongoose": "^5.2.7",
"morgan": "^1.9.0",
"multer": "^1.3.0",
- "node-foursquare": "^0.3.3",
+ "node-foursquare": "^0.4.3",
"node-linkedin": "^0.5.6",
"node-sass": "^4.9.3",
"node-sass-middleware": "^0.11.0",
It looks like the issue is with node-foursquare
tooling details:
https://github.com/babel/babel/issues/5085
This should probably be fixed in node-foursquare. Would you mind creating an issue in that repo? https://github.com/clintandrewhall/node-foursquare
You should be able to move to v0.4.4 and proceed. Let me know if you have any further issues with the recent rewrite! I'm including a blog post that helped me understand how to move forward:
Considering that the scope of the integration fix seems to have increased, it is also valid to ask the bigger question: Is foursquare integration something to keep or replace with another API integration such as Yelp. Hackahton-Starter initiated in 2013 and looking at google trends since 2013 Foursquare's use seem to have gone through a sharp decline, while Yelp seems to be somewhat holding:
It's a good question, though I do know that there are many other companies that rely on Foursquare's data & API.
On Tue 28 Aug 2018, 09:37 Yashar Fakhari, notifications@github.com wrote:
Considering that the scope of the integration fix seem to have increased, it is also valid to ask the bigger question: Is foursquare integration something to keep or replace with another API integration such as Yelp. Hackahton-Starter initiated in 2013 and looking at google trends since 2013 Foursquare's use seem to have gone through a sharp decline, while Yelp seems to be somewhat holding:
[image: image] https://user-images.githubusercontent.com/6448697/44710943-20e20380-aa62-11e8-9d9b-82319ef64f62.png
[image: image] https://user-images.githubusercontent.com/6448697/44711054-61418180-aa62-11e8-886f-758cf19a857f.png
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sahat/hackathon-starter/issues/888#issuecomment-416499362, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdHpSlVF0kgGV0nafbOFzNw12nnJ8F4ks5uVQE-gaJpZM4VulFp .
If you don't mind me weighing in: I know FSQ has waned a bit in the consumer space, but they're pretty strong in venue data and very strong in location detection. I'm not sure if Google searches are the best indicator of apps that use Foursquare integration.
I recently attended HackMidwest, a popular hackathon that took place in Kansas City, and Foursquare had developers there and sponsored prizes... so providing this integration seems germane.
Maybe the right call would be an audit of big-ticket sponsors of hackathons to determine what to provide out of the box?
Perhaps Alexa, Elastic, Twilio and Box/Dropbox should be considered, for example?
I just noticed that Samsung's Bixby Vision on their flagship phones lists Foursquare as one of the underlying data sources as well. We need to fix the integration 👍
The API example is now using the Foursquare REST APIs directly with https://github.com/sahat/hackathon-starter/commit/4cdb5b98ea45ba70e6d50ced69a613789c39c97b
Upgrading node-foursquare from 0.3.3 to 0.4.3 in package.json breaks the project: