i am using foursquare api in xcode.
what i do is: using its api i get authenticated on forsquare successfully , in order to signout i dont see any api documentation there.
i am using following code but not working:
- (void)logout {
oAuth4sq=nil;
oAuth4sq.oauth_token=nil;
oAuth4sq.oauth_token_secret=nil;
[oAuth4sq forget];
[oAuth4sq save];
//[self resetUi];
}
any one guide me how to signout user or kill session of authenticated api? so that i could open a sign in screen in webview instead of getting same user already authenticated there.
any help would be appreciated.
It’s not possible for an app to terminate an auth key — the user needs to revoke access via https://foursquare.com/settings/connections.
If want users to ensure that users explicitly sign in each time via the auth flow, use /authorize instead of /authenticate for the OAuth URL. /authorize always asks the user to authorize the app, where as /authenticate auto-redirects if the logged in user has already authorized the app.