Foursquare social login 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://developer.foursquare.com.

  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 Social Login Dashboard and the Foursquare client ID and client secret to configure Foursquare as a social login provider.


Create 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://developer.foursquare.com).

  2. On the My Apps page, click Create New App:

  3. In the Create a new app dialog, enter the name of your app in the App Name field, and enter your website URL in the App or Company URL field:

    Select I’m not a robot and then click Next.

  4. On the App Settings page, in the Web Addresses section, enter your Foursquare redirect URL in the Redirect URL field and then click Save:

  5. Scroll to the top of the screen and copy your Client ID and Client Secret:

    These values are required to configure Foursquare as a social login provider.

  6. Log off from the Foursquare Developers center.


Use 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:

To create a Foursquare account, complete the following procedure:

  1. Log on to the Foursquare Developers site (https://developer.foursquare.com).

  2. On the My Apps page, click the app you want to use for social login:

  3. On the App Settings page, copy, and store, your Client ID and Client Secret:

    These values are required to configure Foursquare as a social login provider.

  4. Log off from the Foursquare Developers center.


Configure 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 Social Login 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:

  7. 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.

  8. 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.


Test 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:

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

  4. 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:

  2. From the Configure Providers page, click Foursquare.

  3. Profile information returned from Foursquare is displayed onscreen. For example:


Assign 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:

  2. From the Configure Providers page, click Foursquare.

  3. Click the green Configured button to display the Foursquare is currently enabled dialog box:

  4. To change the Foursquare configuration, click Modify these settings.

  5. 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 Social Login Dashboard.


Remove 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 Social Login 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.

📘

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.