Foursquare Social Login Configuration Guide


Foursquare is a search-and-discovery app used by more than 50 million people each month.

Before You Begin

To use Foursquare for social login you must:

  1. Obtain a Foursquare developer account from https://foursquare.com/developer/apps.
  2. Do one of the following:
    • Open a previously-created Foursquare app, and copy the client ID and client secret.
    • Create a new Foursquare app and copy the client ID and client secret.
       
  3. Use the Janrain Engage Dashboard and the Foursquare client ID and client secret to configure Foursquare as a social login provider.

In This Configuration Guide

  • Creating a Foursquare App for Social Login
  • Using an Existing Foursquare App for Social Login
  • Configuring Foursquare as a Social Login Provider
  • Testing Foursquare Social Login
  • Assigning a Different Foursquare App for Social Login
  • Removing Foursquare as a Social Login Provider

Creating a Foursquare App

This section walks you through the process of creating a Foursquare app for social login. If you already have an app, see the Using an Existing Foursquare App for Social Login section of this documentation.

To create a Foursquare account, complete the following procedure:

  1. Log on to the Foursquare Developers site (https://foursquare.com/developers/apps).
  2. From the home page, under the My Apps label, click Create a new app:

  1. On the New Developer app page, enter:
    • The name of your app in the Get started integrating Foursquare into your app or website field.
    • The URL of your website in the Application URL field.
    • Your Foursquare callback URL in the Redirect URI(s) field. If you are using a standard Janrain domain, your redirect URL will look similar to this: https://greg-stemp.rpxnow.com/ foursquare/callback.
  2. Scroll down to the bottom of the page and click the Recaptcha field.
     
  3. After the message I’m not a robot appears in the Recaptcha field, click Create App and Verify:

  1. From the My Apps page, click More about this app:

  1. From the home page for your app, copy the Client_ID and Client_Secret. You can copy this information to a text editor, then close the text editor after you have configured Janrain social login:

  1. Log off from the Foursquare Developers site.

Using an Existing Foursquare App for Social Login

If you already have a Foursquare app that can be used for social login, complete the following steps to retrieve the application’s client ID and client secret:

  1. Log on to the Foursquare Developers center (https://foursquare.com/developers/apps).
  2. From the My Apps page, locate the app you want to use for configuring social login and then click More about this app:

  1. From the home page for your app, copy the Client_ID and Client_Secret. You can copy this information to a text editor, then close the text editor after you have configured Janrain social login:

  1. Log off from the Foursquare Developers center.

Configuring Foursquare as a Social Login Provider

To configure Foursquare as a social login provider, make sure you have your Foursquare client ID and client secret, and then complete the following procedure:

  1. Log on to your Janrain Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers.
  5. From the list of Providers, click Foursquare.
  6. In the Foursquare dialog box, click Next until you reach the screen requesting the client ID and client secret:

  1. Paste your Foursquare client ID in the Client ID field, paste your Foursquare client secret in the Client Secret field, and then click Save. Foursquare appears in your social login widget.
  2. When you are finished, select Save and Publish and then click Publish. It might take as long as one hour before Foursquare appears as a social login option on your web site.

Testing Foursquare Social Login

To test Foursquare social login, complete the following procedure:

  1. Do one of the following:
    • If you have just published your widget settings, click the Test your widget link that appears after the widget has been saved.
    • If you previously published your widget settings then, from the Engage Dashboard Sign-in page, click Launch a test widget.
       
  2. From the Test page, click the Foursquare icon:

  1. In the Foursquare window, logon using a valid Foursquare account:

  1. If login succeeds, information returned from the Foursquare profile is displayed in the API response preview field:

The returned profile information will vary depending on the Foursquare account used in the test.

You can verify Foursquare profile fields by completing the following procedure:

  1. From the Engage Dashboard home page, click the Manage Providers icon:

  1. From the Configure Providers page, click Foursquare.
  2. Profile information returned from Foursquare is displayed onscreen. For example:

See Also


Assigning a Different Foursquare App for Social Login

If you want to use a different Foursquare app or if you need to change your existing app, you must update the Foursquare provider configuration settings. To do that, complete the following procedure:

  1. From the Engage Dashboard home page, click the Manage Providers icon:

  1. From the Configure Providers page, click Foursquare.
  2. Click the green Configured button to display the Foursquare is currently enabled dialog box:

  1. To change the Foursquare configuration, click Modify these settings.
  2. In the Foursquare dialog box, change the Client ID and/or Client Secret as needed, and then click Save:

Although you can modify your Foursquare settings, you cannot delete those settings. If you delete the settings and then try to save your changes, you’ll see the error message Please enter your Consumer Key and Secret exactly as Foursquare shows them.

This means that you cannot “unconfigure” the provider: once configured, the Foursquare icon will always be shown as green (i.e., configured) in the Janrain Dashboard.


Removing Foursquare as a Social Login Provider

If you no longer want to use Foursquare for social login, you can remove Foursquare as a social login provider by completing the following procedure:

  1. Log on to your Janrain Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers**.
  5. In the widget, click the X in the upper right corner of the Foursquare icon.
  6. Scroll to the bottom of the page, select Save and Publish, and then click Publish. Foursquare no longer appears in the sign-on widget.
Note. You must always have at least one social login provider in the widget. If you delete all the providers and then click Publish, you’ll see the error message Couldn’t save configuration: No providers.