Closed matiasironyard closed 7 years ago
@matiasironyard : What is an actual business_id
that causes this problem? I have a hunch the business matters. (In particular, a business with no reviews might cause this behavior.)
Also, what is the full URL you're sending in the business search step? Not sure whether you're talking about something like:
(Sounds like you're using the non-official clientlib https://github.com/kristenlk/yelp-api-v3 .)
Thank you for the quick reply. I get that error with any ID. Do you have any advice on a library or setup? I'm currently running a Express proxy server since cors is not supported. thank you for your help!
On Dec 7, 2016 12:34 PM, "Ken Mitton" notifications@github.com wrote:
(Sounds like you're using the non-official clientlib https://github.com/kristenlk/yelp-api-v3 .)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Yelp/yelp-fusion/issues/135#issuecomment-265515050, or mute the thread https://github.com/notifications/unsubscribe-auth/AUQtGEFPUQrvKOXCVay5rNiZG3cPxynNks5rFu4mgaJpZM4LGuOb .
@matiasironyard : What's one example URL that causes the problem? I think seeing the actual URL you're fetching will help.
Here it is using Fusion (from the proxy server, takes a minute to fire up):
https://yelp-proxy-server.herokuapp.com/businesses?business=north-india-restaurant-san-francisco
I'm also successfully doing a business search using Yelp v2:
https://yelp-proxy-server.herokuapp.com/bizz?business=urban-curry-san-francisco
I'm using the yelp 1.0.1 library with the following set up:
var Yelp = require('yelp');
app.get('/bizz', function(req, res){ // listens for request on /api route
console.log('test api!');
// res.send('working api!');
var yelp = new Yelp({
consumer_key: 'key',
consumer_secret: 'secret',
token: 'token',
token_secret: 'token_secret',
});
var business = req.query.business;
yelp
.business(business)
.then(function(data){
res.send(data);
}).catch(console.error);
});
From the API perspective:
One likely suspect is the (non-official) proxy server. Did you set up that proxy server yourself? If not --- who did? You might need to get their help to debug.
I see you mention both:
var Yelp = require('yelp');
var YelpFusion = require('yelp-api-v3')
Could you provide a link to the actual package (maybe on github)? You might need to work with the author of that library.
good sign is working from your end. i set up the server and i narrowed it down to this error:
gary-danko-san-francisco
Promise {
i will reach out to the library creator and see what they say.
Proxy server issue, closing this.
I'm using yelp-api-v3 through a proxy server and I'm successfully querying restaurants by phone number, but when I try to do by business ID, I get null. I'm including both codes for comparison and help. Any thoughts on how to make the business search work? (I'm building a react js component).
REQUIRE
var YelpFusion = require('yelp-api-v3');
PHONE SEARCH RETURNING
BUSINESS....
BUSINESS SEARCH RETURNING NULL....