Php 如何设置Fousquare API的限制

Php 如何设置Fousquare API的限制,php,api,foursquare,Php,Api,Foursquare,我正在从Foursquare API获取入住登记。但是,API得到了所有的签入。我只需要5个登记处。我如何设定一个限制 我的代码: 您可以传递一个可选参数来设置限制 例如: /victions/{$userId}/herenow?limit=5我尝试了这个方法,但现在可以用了。未捕获异常“EpiFoursquareBadRequestException”,消息为“{”meta“{”code:400,“errorType:“无效的身份验证”,“errorDetail:“缺少访问凭据。有关详细信息

我正在从Foursquare API获取入住登记。但是,API得到了所有的签入。我只需要5个登记处。我如何设定一个限制

我的代码:


您可以传递一个可选参数来设置限制

例如:


/victions/{$userId}/herenow?limit=5

我尝试了这个方法,但现在可以用了。未捕获异常“EpiFoursquareBadRequestException”,消息为“{”meta“{”code:400,“errorType:“无效的身份验证”,“errorDetail:“缺少访问凭据。有关详细信息,请参阅https:\/\/developer.foursquare.com\/docs\/oauth.html。”,/satocafe/four/EpiFoursquare.php:244堆栈跟踪:{}0/public\ html/satocafe/four/EpiFoursquare.php中的“{}”(208):EpiFoursquareException::raise(Object(EpiCurlManager),false)#1//public_html/satocafe/index.php(162):EpiFoursquareJson->#u get('response')#2{main}在第244行的public_html/satocafe/four/EpiFoursquare.php中抛出,当您发出依赖身份验证的请求时,您需要提供访问凭据。如下所示:
oauth_token=access_token
。请参阅文档页。我有access_token和我的查询:但不起作用。我如何获得oauth_token?我没有使用该库,但它看起来很有用ke
$fsObjUnAuth->setAccessToken($\u COOKIE['access\u token']);
这里有几点。1)
access\u token
基本上与
oauth\u token
相同。前者在Foursquare的响应中返回给您,后者在API调用中用作参数名。2) 看起来你正在呼叫Vinces/userId/herenow。。。如果你想知道一个场馆里有多少人,那么userId应该被venueId替换。如果您想查看自己之前的5次签入,则端点为users/userId/checkins。看到和