Skip to content

Instantly share code, notes, and snippets.

@lnanek
Created October 9, 2012 04:50
Show Gist options
  • Save lnanek/3856681 to your computer and use it in GitHub Desktop.
Save lnanek/3856681 to your computer and use it in GitHub Desktop.
Example of logging into Foursquare
public class ShowRecommendations extends VenueListingActivity implements
LocationLookupCall.OnLocationLookupListener, OnExploreListener {
public void onLoginClicked() {
foursquare.showAuthorization()
// Refresh results if the user logged in.
.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
if (foursquare.isAuthorized()) {
new LocationLookupCall(ShowRecommendations.this, ShowRecommendations.this).call(false);
}
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment