lschlessinger
lschlessinger

Reputation: 1954

Making userless requests in Foursquare API with easyFoursquare4Android library

I'm making an Android app and am trying to use the Foursquare API. I started to use the Foursquare-recommended library, easyFoursquare4Android.

I registered my Foursquare app at https://foursquare.com/developers/apps. I Changed the CLIENT_ID and CLIENT_SECRET constant values in the easyFoursquare4Android library.

How can I make userless requests such as getting nearby venues with the easyFoursquare4Android library?

To get access to the API, you must call the AccessTokenRequest class, which tries to get an access token.

I found the userless access section in the Foursquare API Docs, which says that

"To make a userless request, specify your consumer key's Client ID and Secret instead of an auth token in the request URL."

Should I change the library since it doesn't look like it supports userless access?

Edit:

I made an issue in the easyFoursquare4Android library GitHub Repository.

Upvotes: 1

Views: 481

Answers (1)

njzk2
njzk2

Reputation: 39406

The library seems to rely on having an access token.

You possibly can override that behavior by editing the hasAccessToken method to return true in EasyFoursquare and EasyFoursquareAsync.

Upvotes: 2

Related Questions