简体   繁体   English

Foursquare API错误:缺少访问凭据

[英]Foursquare API error: Missing access credentials

I'm making an Android app and am trying to use the Foursquare API . 我正在制作一个Android应用程序,并尝试使用Foursquare API I started to use the foursquare-recommended library, easyFoursquare4Android . 我开始使用Foursquare推荐的库easyFoursquare4Android

I registered my foursquare app at https://foursquare.com/developers/apps . 我在https://foursquare.com/developers/apps注册了我的foursquare应用。 I Changed the CLIENT_ID and CLIENT_SECRET constant values in the easyFoursquare4Android library. 我在easyFoursquare4Android库中更改了CLIENT_IDCLIENT_SECRET常量值。

I tried to getVenuesNearby() and am getting this error message: 我试图getVenuesNearby()并收到以下错误消息:

Missing access credentials. See https://developer.foursquare.com/docs/oauth.html for details.

I also am using the Facebook SDK and am using the same Certificate fingerprint <SHA1> that I'm using for Facebook. 我还使用了Facebook SDK,并且使用了与Facebook相同的Certificate fingerprint <SHA1>

Can I reuse the android key hash that I used with my Facebook app or do I have to make a new one? 我可以重复使用我与Facebook应用程序一起使用的android key哈希,还是必须重新制作一个?

I solved this by logging the String I was sending to the API. 我通过记录要发送到API的字符串来解决此问题。

I never called EasyFoursquare.requestAccess(this) or EasyFoursquareAsync.requestAccess(this) , which requests the access to API by getting an oauth token. 我从未调用过EasyFoursquare.requestAccess(this)EasyFoursquareAsync.requestAccess(this) ,后者通过获取oauth令牌来请求对API的访问。

So I never actually sent a CLIENT_ID and CLIENT_SECRET in my request. 因此,我从未在请求​​中实际发送过CLIENT_IDCLIENT_SECRET

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM