Problem with facebook connect button in chrome (we use django and django-socialauth)

We use djangoit django-socialauthfor auth using google / fb / twitter, but there is a problem with the button for connecting to facebook only in chrome (without safari), the button does not appear.

+3
source share
2 answers

If you have a custom buttom for fb, you can use facebook middleware to fix this:

add this to your MIDDLEWARE_CLASSESin settings.py:

...
'facebook.djangofb.FacebookMiddleware',
...
+1
source

Hah - 3 , Google, django-socialauth, , , Facebook. .

, hardcoding , ( - , . - , - jQuery , IF Javascript )

<a href="#" onclick="if ($.browser.webkit || $.browser.safari) { FB.Connect.logout(function(){FB.Connect.requireSession(facebook_onlogin);return false;}); } else { FB.Connect.requireSession(facebook_onlogin); }; return false;">
    <img id="RES_ID_fb_login_image" src="http://static.ak.fbcdn.net/rsrc.php/zA114/hash/7e3mp7ee.gif" alt="Connect">
</a>
+1

Source: https://habr.com/ru/post/1733038/


All Articles