<a id="facebook-limited-login"></a>

# Facebook Limited Login

<a id="backend-class"></a>

## Backend class

For Django, add this class path to `AUTHENTICATION_BACKENDS`. For other
integrations, use the same class path in the framework-specific backend
setting.

| Backend name             | Class path                                                   |
|--------------------------|--------------------------------------------------------------|
| `facebook-limited-login` | `social_core.backends.facebook_limited.FacebookLimitedLogin` |

[Facebook Limited Login](https://developers.facebook.com/docs/facebook-login/limited-login/) is required by the Facebook iOS SDK.

<a id="app-creation"></a>

## App creation

Register a new application at [Facebook App Creation](https://developers.facebook.com/apps/creation/), don’t use
`localhost` in the `App Domains` and `Site URL` fields as
Facebook does not allow this.

Instead, use a placeholder like `myapp.com` and define that
domain in your `/etc/hosts` or similar file for your OS. For
more information see the [hosts file](https://en.wikipedia.org/wiki/Hosts_(file)) article on Wikipedia.

<a id="configuration"></a>

## Configuration

Set the `SOCIAL_AUTH_FACEBOOK_LIMITED_LOGIN_KEY` to the value
of the `App Id`.  This field is required for verifying the
Facebook access token received from the iOS SDK.

<a id="django-configuration"></a>

## Django Configuration

Set the Facebook Limited Login Key in `settings.py`:

```python
SOCIAL_AUTH_FACEBOOK_LIMITED_LOGIN_KEY = "{app_id}"
```

Enable the auth backend:

```python
AUTHENTICATION_BACKENDS = (
  ...
  "social_core.backends.facebook_limited.FacebookLimitedLogin",
  ...
)
```
