Extension, Module

Archived
Forum
(read-only)


For official support, visit the official support site »

Smart Members PRO

ExpressionEngine 2, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From ZealousWeb

     

Facebook login issue

Support Request

stefanos
stefanos

To activate Facebook method in Social Login settings, I did all the steps from the Social setting / Facebook documentation.

Using this Social Login template tags:

{exp:smart_members:social_login providers "facebook"

return = "conta"

remember_me "yes"
secure_action="yes"
secure_return="yes"

enable_recaptcha "yes"
popup "yes"
}

{providers}
{if providers
:count == 1}
<p>
 <
select name="providers">
  <
option value=""></option>
  
{/if}
  
<option value="{provider_name}">{provider_label}</option>
  
{if providers:count == providers:total_results}
 
</select>
</
p>
{/if}
{
/providers}

<div class="login-register-click cf">
 <
input type="submit" class="login-popup-btn register" value="Login With Social media" >
</
div>
{/exp:smart_members:social_login} 

The page works well but when I click on Login With Social media button, a Facebook popup window appears with this error message:

URL blocked: This redirect failed because the redirect URI is not white-listed in the app’s client OAuth settings. Make sure that the client and web OAuth logins are on and add all your app domains as valid OAuth redirect URIs.

As Default callback URL is https://www.mysite.com/?ACT=229, I Selected the callback URL I have put in API.

As my callback URL is https://www.mysite.com/?ACT=229, to the callback URL for facebook I entered https://www.mysite.com/?ACT=229/?ACT=85&hauth;.done=Facebook

But the problem of Facebook popup window appears with this error message continue.

I tried to copy and paste the URI of the Facebook Popup window message:

https://www.facebook.com/v2.8/dialog/oauth?auth_type=rerequest&client_id=336078570995991&state=c2c83caa37d8ec2189eb4cb55c89e8eb&response_type=code&sdk=php-sdk-5.6.1&redirect_uri=https://www.mysite.com?ACT=229&hauth_done=Facebook&scope=email,user_birthday,user_hometown,user_location

I put on the Valid OAuth Redirect URIs this URI:

https://www.mysite.com?ACT=229&hauth_done=Facebook&scope=email,user_birthday,user_hometown,user_location

the problem of Facebook popup window appears with this error message still continue.

How to resolve this problem ?

 

stefanos
# 1
stefanos

Inside the Smart Member Pro documentation the link to enter is:
for facebook will be http://www.example.com/?ACT=85&hauth;.done=Facebook

But the link sent by Facebook has a small difference, in place of &hauth;.done=Facebook is &hauth_done=Facebook

So I entered in thecallback URL for facebook
https://www.cistosaracnoide.org/?ACT=229&hauth_done=Facebook


And now this a new message error appears:

Invalid Scopesuser_birthdayuser_hometownuser_locationThis message is only shown to developersUsers of your app will ignore these permissions if presentPlease read the documentation for valid permissions athttps://developers.facebook.com/docs/facebook-login/permissions 

the link copied from the Facebook popup window:

https://www.facebook.com/v2.8/dialog/oauth?auth_type=rerequest&client_id=1729931900352368&state=444400b75d4ee8d9bb83d4210a562949&response_type=code&sdk=php-sdk-5.6.1&redirect_uri=https://www.mysite.com/?ACT=229&hauth_done=Facebook&scope=email,user_birthday,user_hometown,user_location 
stefanos
# 2
stefanos

Now it’s working fine.

The difficulty was to set correctly the URI to the white-listed in the Facebook app’s client OAuth settings.

http://www.example.com/?ACT=85&hauth;.done=Facebook from the SmartMember documentation seems not to work anymore.

http://www.example.com/?ACT=229&hauth_done=Facebook

Just changing . by _ solved the problem.

ZealousWeb
# 3
Developer
ZealousWeb

Hello Stefanos,

Thank you for updated it here and your solution shared

We are going to close this thread.

Let me know if you need any help,

Thanks,
Piyush Patel
ZealousWeb Support Team