-1

I am trying to develop a non-web application (mobile, non-mobile) for consuming information from Foursquare. I would like to have the user authenticated by entering a valid username and password and accessing his account using this authentication. Is this possible? From what I've read, it seems the only way to access Foursquare is by using OAuth, which is not what I had in mind.

Any thoughts?

Thanks!

RP

Will Hartung
  • 115,893
  • 19
  • 128
  • 203
Ricardo Peres
  • 13,724
  • 5
  • 57
  • 74
  • You can authenticate the user to your application with a username and password, but in order to interact with Foursquare on that user's behalf you will need to ask the user to associate their Foursquare account with the username in your application. This is where OAuth comes in as you will get a token for that user that you will then store against that username and subsequently use to query Foursquare's API. – Russ Cam Feb 22 '12 at 16:20

2 Answers2

2

OAuth isn't a protocol that works only with webbrowsers. However, many OAuth services provide a web-only authorization endpoint. Once the authorization part is done, you can use OAuth from any application, web, desktop or mobile (and embedded systems).

There are many ways to handle this browser requirement, but these two are very common:

  • Simply embed a webbrowser in your application that shows the user the authorization page, let him log in, and finish the OAuth sequence. Once that's done, you have the keys and don't need the browser anymore.
  • Use an external browser. This is definitely the recommended approach, since it's more secure and users will probably like it a little bit more. The idea is that you simply open the authorization URL using the user's webbrowser, and set a redirect URL that points back at the app. This is normally done using a myapp://auth URL, which will simply send the data to the application again.
Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
0

I believe OAuth is your only option if you plan on using the Foursquare api. You can read about Foursquare's Authorization here https://developer.foursquare.com/overview/auth