[Django]-In django-social-auth, can't get the Facebook authentication link to show?

3đź‘Ť

âś…

I found the problem, I’m not really sure why this has happened:

In Facebook settings, The app_secret is called “App secret”. So quickly looking through, I had defined “APP_SECRET”. I think I actually had that copied from another app. However, in the code, App secret is defined as “API_SECRET”. So just by changing that, it works. Maybe this will be useful to someone.

👤Riku

0đź‘Ť

Facebook uses OAuth2 so it will be under social_auth.backends.oauth2 key, try this snippet instead:

{% for name in social_auth.backends.oauth2 %}
    <li><a rel="nofollow" href="{% url socialauth_begin name %}">{{ name|title }}</a></li>
{% endfor %}

I hope those aren’t your real Facebook APP_ID and APP_SECRET

👤omab

Leave a comment