How to authenticate with Foursquare OAuth2 in a jQueryMobile application (without a user stream)

I am creating a mobile application with jQueryMobile, and I intend to deploy it on iPhone thanks to PhoneGap.

My question is: how can I authenticate myself with Foursquare using the OAuth2 protocol in my jQueryMobile application? One solution would be to use the useragent OAuth2 stream, but that would force the iPhone to launch Safari and thus not remain in the application. Are there any better solutions than this?

+3
source share
2 answers

For an iPhone-based or client-side application, as in PhoneGap, Foursquare recommends one of these methods.

  • , - , . URL- . Android iOS .
  • , , , . API Facebook, display = touch URL-, .
  • , URI, . . , , , , , .

https://developer.foursquare.com/docs/oauth.html

, , ClientBrowser PhoneGap , PhoneGap.

+1

OAuth2 , , XAuth. , , , .

Phonegap, - , UIWebView , - "" , , UIWebView, . html UIWebView,

- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
0

All Articles