tobilg / facebook-events-by-location-core

[DEPRECATED] Search Facebook events by location and proximity.
MIT License
141 stars 56 forks source link

Error on newest version #9

Closed franciscorubin closed 7 years ago

franciscorubin commented 7 years ago

Hey, first of all thanks for keeping this awesome piece of software updated!!

I upgraded to the newest version today (0.3.0), but it's throwing some errors when I try to do a request

Warning: a promise was rejected with a non-error: [object Object] W20170413-18:18:15.252(2)? (STDERR) at /Users/projects/Projects/Personal/node_modules/facebook-events-by-location-core/lib/eventSearch.js:325:17 W20170413-18:18:15.252(2)? (STDERR) at processImmediate [as _immediateCallback] (timers.js:396:17) W20170413-18:18:15.253(2)? (STDERR) From previous event: W20170413-18:18:15.253(2)? (STDERR) at [object Object].EventSearch.search (/Users/projects/Projects/Personal/node_modules/facebook-events-by-location-core/lib/eventSearch.js:131:12) W20170413-18:18:15.253(2)? (STDERR) at [object Object]._handler (imports/server/publish.js:30:8) W20170413-18:18:15.253(2)? (STDERR) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1737:12) W20170413-18:18:15.253(2)? (STDERR) at [object Object]._.extend._runHandler (packages/ddp-server/livedata_server.js:1035:17) W20170413-18:18:15.262(2)? (STDERR) at [object Object]._.extend._startSubscription (packages/ddp-server/livedata_server.js:853:9) W20170413-18:18:15.263(2)? (STDERR) at [object Object]._.extend.protocol_handlers.sub (packages/ddp-server/livedata_server.js:625:12) W20170413-18:18:15.263(2)? (STDERR) at packages/ddp-server/livedata_server.js:559:43 W20170413-18:18:15.380(2)? (STDERR) {"message":{"name":"StatusCodeError","statusCode":400,"message":"400 - \"{\\\"error\\\":{\\\"message\\\":\\\"The action attempted has been deemed abusive or is otherwise disallow ed\\\",\\\"type\\\":\\\"OAuthException\\\",\\\"code\\\":368,\\\"error_subcode\\\":1489009,\\\"is_transient\\\":false,\\\"error_user_title\\\":\\\"Too many place searches\\\",\\\"error_user_msg\\\":\\\"You searched for too many places in a short amount of time. You will be allowed to search for more places after some time has passed.\\\",\\\"fbtrace_id\\\":\\\"FIj9mmbDdYI\\\"}}\"","error":"{\"error\":{\"message\":\"The action attempted has been deemed abusive or is otherwise disallowed\",\"type\":\"OAuthException\",\"code\":368,\"error_subcode\":1489009,\"is_transient\":false,\"error_user_title\":\"Too many place searches\",\"error_use r_msg\":\"You searched for too many places in a short amount of time. You will be allowed to search for more places after some time has passed.\",\"fbtrace_id\":\"FIj9mmbDdYI\"}}","options":{"uri":"https://graph.fa cebook.com/v2.7/search?type=place&q=&center=52.370987900020594,4.897470250725746&distance=1000&limit=100&fields=id&access_token=EAAZAEZC5u8GuoBAJR2kevJwwWIXw2ZBY1lTdoK7XIqE4BLm61w6PUvoF5fhCzu35ZAZBQoogtN0QmBNjXdxQG oUZBpsv5kKNhLyvvlknaYQira3fpJGDpyfibOmHxTU32ScVJGtmJqZBsfgnnpOJ7Q63r29zZCkjsgZCCjyrTgNdgEAZDZD&after=NDk5","method":"GET","simple":true,"resolveWithFullResponse":false,"transform2xxOnly":false},"response":{"statusC ode":400,"body":"{\"error\":{\"message\":\"The action attempted has been deemed abusive or is otherwise disallowed\",\"type\":\"OAuthException\",\"code\":368,\"error_subcode\":1489009,\"is_transient\":false,\"error _user_title\":\"Too many place searches\",\"error_user_msg\":\"You searched for too many places in a short amount of time. You will be allowed to search for more places after some time has passed.\",\"fbtrace_id\": \"FIj9mmbDdYI\"}}","headers":{"www-authenticate":"OAuth \"Facebook Platform\" \"invalid_request\" \"The action attempted has been deemed abusive or is otherwise disallowed\"","access-control-allow-origin":"*","prag ma":"no-cache","cache-control":"no-store","x-fb-rev":"2955911","content-type":"text/javascript; charset=UTF-8","x-fb-trace-id":"FIj9mmbDdYI","facebook-api-version":"v2.7","expires":"Sat, 01 Jan 2000 00:00:00 GMT"," vary":"Accept-Encoding","x-fb-debug":"KG8CEACPNSrtXex5Bj5wG37UAGfLD2bJJQw1Oyn0/pPD6t0JpL7iNVi6JnYyWa82PKPejDA1hikGahGUHweBXw==","date":"Thu, 13 Apr 2017 16:18:14 GMT","connection":"close"},"request":{"uri":{"protoc ol":"https:","slashes":true,"auth":null,"host":"graph.facebook.com","port":443,"hostname":"graph.facebook.com","hash":null,"search":"?type=place&q=&center=52.370987900020594,4.897470250725746&distance=1000&limit=10 0&fields=id&access_token=EAAZAEZC5u8GuoBAJR2kevJwwWIXw2ZBY1lTdoK7XIqE4BLm61w6PUvoF5fhCzu35ZAZBQoogtN0QmBNjXdxQGoUZBpsv5kKNhLyvvlknaYQira3fpJGDpyfibOmHxTU32ScVJGtmJqZBsfgnnpOJ7Q63r29zZCkjsgZCCjyrTgNdgEAZDZD&after=ND k5","query":"type=place&q=&center=52.370987900020594,4.897470250725746&distance=1000&limit=100&fields=id&access_token=EAAZAEZC5u8GuoBAJR2kevJwwWIXw2ZBY1lTdoK7XIqE4BLm61w6PUvoF5fhCzu35ZAZBQoogtN0QmBNjXdxQGoUZBpsv5kK NhLyvvlknaYQira3fpJGDpyfibOmHxTU32ScVJGtmJqZBsfgnnpOJ7Q63r29zZCkjsgZCCjyrTgNdgEAZDZD&after=NDk5","pathname":"/v2.7/search","path":"/v2.7/search?type=place&q=&center=52.370987900020594,4.897470250725746&distance=100 0&limit=100&fields=id&access_token=EAAZAEZC5u8GuoBAJR2kevJwwWIXw2ZBY1lTdoK7XIqE4BLm61w6PUvoF5fhCzu35ZAZBQoogtN0QmBNjXdxQGoUZBpsv5kKNhLyvvlknaYQira3fpJGDpyfibOmHxTU32ScVJGtmJqZBsfgnnpOJ7Q63r29zZCkjsgZCCjyrTgNdgEAZDZ D&after=NDk5","href":"https://graph.facebook.com/v2.7/search?type=place&q=&center=52.370987900020594,4.897470250725746&distance=1000&limit=100&fields=id&access_token=EAAZAEZC5u8GuoBAJR2kevJwwWIXw2ZBY1lTdoK7XIqE4BLm 61w6PUvoF5fhCzu35ZAZBQoogtN0QmBNjXdxQGoUZBpsv5kKNhLyvvlknaYQira3fpJGDpyfibOmHxTU32ScVJGtmJqZBsfgnnpOJ7Q63r29zZCkjsgZCCjyrTgNdgEAZDZD&after=NDk5"},"method":"GET","headers":{}}}},"code":-1}

"You searched for too many places in a short amount of time. You will be allowed to search for more places after some time has passed."

The wierd thing is that I get this after making one single request.

lsrodri commented 7 years ago

I am currently only getting 100 places, no matter what my radius is. Is facebook limiting the number of results?

tobilg commented 7 years ago

@pancho111203 Have you used an app acces token?

@lucasiq Please don't hijack other issues. Make sure you use the latest version

franciscorubin commented 7 years ago

@tobilg Yes, I have. The only change I made is updating to the latest version (it wasn't throwing the error before)

tobilg commented 7 years ago

Well, you seem to hit the rate limiting. You shouldn't use a too big radius. My tests included in this project are running fine for me. I'm not seeing this error.