Notifications
Clear all

wpForo 1.x.x [Solved] Facebook Login not Working

19 Posts
5 Users
0 Likes
2,145 Views
Posts: 10
Topic starter
(@raine)
Active Member
Joined: 4 years ago

Hi Support Team,

I have installed your Forum plugin on my Wordpress site and have set up my Facebook API Configuration.  I have followed both your and Facebook documentation (several times); however, when trying to log in using Facebook the following message appears: "The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings."

I have raised this question with Wordpress support who also would like to advise that their log is showing the following warning message: 

[10-Feb-2020 01:07:43 UTC] PHP Warning: session_start(): Cannot start session when headers already sent in /srv/htdocs/wp-content/plugins/wpforo/wpf-includes/class-notices.php on line 16

Thanking you for your assistance,

Raine

 

 

18 Replies
2 Replies
(@josephkozubek)
Joined: 4 years ago

New Member
Posts: 2
Posted by: @raine

Hi Support Team,

I have installed your Forum plugin on my Wordpress site and have set up my Facebook API Configuration.  I have followed both your and Facebook documentation (several times); however, when trying to log in using Facebook the following message appears: "The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings."

I have raised this question with Wordpress support who also would like to advise that their log is showing the following warning message: 

[10-Feb-2020 01:07:43 UTC] PHP Warning: session_start(): Cannot start session when headers already sent in /srv/htdocs/wp-content/plugins/wpforo/wpf-includes/class-notices.php on line 16

Thanking you for your assistance,

Raine

 

 

You need to login to Facebook tools and add a domain with and without prefix. Example: --> www.yourdomain.com <-- ; ---> yourdomain.com <<- Simple, right? 🙂

Alvina
Moderator
(@alvina)
Joined: 5 years ago

Member
Posts: 1869

@josephkozubek,

Just follow the instruction on How to get Facebook App ID and Secret Key and pay attention in Step 6

https://wpforo.com/community/faq/how-to-get-facebook-app-id-and-secret-key/

Sofy
Posts: 4309
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

Hi @raine,

Please try the solution mentioned in this article: 

https://wp-native-articles.com/blog/news/how-to-fix-facebook-apps-error-cant-load-url-domain-url-isnt-included-apps-domains/

6 Replies
(@raine)
Joined: 4 years ago

Active Member
Posts: 10

Hi @sofy,

Thank you for your reply.  I note in the link it says:

"it means that you now have to put the exact return URL into the Valid OAuth Redirect URIs input. Previously, with strict mode disabled, you could just put your domain name in and that would be enough. Now it has to be the exact URL that your return to once you’re authorised Facebook. This will be different depending on the App you’re using to connect to Facebook. If you’re using WP Native Articles it’s:

http://your-site.com/wp-admin/admin.php?page=wpna_facebook&tab=api&wpna-action=facebook_login

If you’re unsure what your callback URL should be, get in touch with the makers of the App you’re using or check the documentation."

******

This is my problem, I haven't been able to work out what the "exact return URL into the Valid OAuth Redirect URIs input." should be.  I have entered nearly every sub-domain on my site with no success.  I have read a number of other documentations similar to the above for the same action which all have "facebook" somewhere in the return URL? 

 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@raine,

Just put your forum URL in the Redirect URLs field.

Please explain the problem again. After seeing the error, have you checked whether the account is created or not?

Your issue doesn't come from the FB API configuration. You have some error in output buffer in your WordPress which affects wpForo Session Initiation. You should disable other plugins and test again. if the error still exists you should check the functions.php of your active theme. Maybe some custom code generates an error in output buffer.

Here are the description of your error:

https://wordpress.org/support/topic/lots-of-warnings-in-error-logs/#post-10431325

https://wpforo.com/community/how-to-and-troubleshooting-2/php-issue-with-wpforo/#post-24821

 

(@raine)
Joined: 4 years ago

Active Member
Posts: 10

Hi @robert,

Thank you for replying.  

I have tried putting the forum URL in the redirect.  I have now tried deactivating all my plugins and that hasn't worked either.  I have read your links but to be honest I don't understand them. 

I have this error code coming up when I inspect console on google chrome, I don't know if it means anything:

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
at Object.prepareCall (sdk.js?hash=bc23c13383123a27416f0dc86aec0fc8&ua=modern_es6:141)
at i (sdk.js?hash=bc23c13383123a27416f0dc86aec0fc8&ua=modern_es6:176)
at a.<anonymous> (sdk.js?hash=bc23c13383123a27416f0dc86aec0fc8&ua=modern_es6:176)
at a.inform (sdk.js?hash=bc23c13383123a27416f0dc86aec0fc8&ua=modern_es6:53)
at q (sdk.js?hash=bc23c13383123a27416f0dc86aec0fc8&ua=modern_es6:91)
at B (sdk.js?hash=bc23c13383123a27416f0dc86aec0fc8&ua=modern_es6:91)
at sdk.js?hash=bc23c13383123a27416f0dc86aec0fc8&ua=modern_es6:91

Attached as screenshot also.

 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@raine

Could you please leave a direct link to your forum login page?

 

(@raine)
Joined: 4 years ago

Active Member
Posts: 10
(@raine)
Joined: 4 years ago

Active Member
Posts: 10

Hi @robert

Sorry I didn't answer your other question: After seeing the error, have you checked whether the account is created or not?

Yes, I have checked and the account is not created.  Others have tried also and no account is being created.

I have tried another social login plugin and have had no problem, which I then removed totally before trying again with the integrated forum Facebook login.

 

Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago
Posted by: @raine

@robert

Thanks

https://rememberingthepastaustralia.com/community/

Thank you @raine,

It I see this error:

Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

 

Have you tried the solution in the article suggested by Sofy above?

 

How to fix

1. Go to http://developers.facebook.com/apps/ and select the app you wish to fix.

2. ​At the bottom of the left hand menu click + Add Product link.

Add Product

3. Select Facebook Login as the Product.

4. Select Web.

Select Platform

5. Enter your Site URL and hit save.

Enter Site URL

​6. Hit Continue then keep clicking Next, ignoring all the code, until you get to Step 5

​7. In the left hand menu you should now see Facebook Login, click the Settings menu item underneath it.

Facebook Login Settings Link

​8. Under Client oAuth settings, where it says Use Strict Mode for Redirect URIs make sure it’s set to No and that your site URL is in the Valid OAuth redirect URIs box. Then the hit save.

Facebook oAuth Strict Mode

​9. You should now be able to connect your app as normal.

8 Replies
(@raine)
Joined: 4 years ago

Active Member
Posts: 10

Hi @robert

Yes, I read the article sofy linked to.  The bottom half you have screenshot is not relevant because, as per the article,

"UPDATE – March 2018
Facebook has been aggressively tightening security. Any new Facebook Login Apps create AFTER the beginning of March 2018 now have Use Strict Mode for Redirect URIs and Enforce HTTPS enabled by default and can no longer be disabled."

They also say (and where I'm stuck because it no longer allows you to just put your domain name in):

"it means that you now have to put the exact return URL into the Valid OAuth Redirect URIs input. Previously, with strict mode disabled, you could just put your domain name in and that would be enough. Now it has to be the exact URL that your return to once you’re authorised Facebook. This will be different depending on the App you’re using to connect to Facebook. If you’re using WP Native Articles it’s:

http://your-site.com/wp-admin/admin.php?page=wpna_facebook&tab=api&wpna-action=facebook_login

 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@raine,

And again NO, forget about that URL. You should insert your forum URL. So I think you have some site specific problem, because other social login plugins don't work too. I recommend delete the APP you've created on Facebook and start creating it again. There are tons of articles and support topics related to this error:

https://www.google.com/search?client=firefox-b-d&q=Cant+Load+URL%3A+The+domain+of+this+URL+isnt+included+in+the+apps+domains

 

(@raine)
Joined: 4 years ago

Active Member
Posts: 10

@robert

I have deleted the APP over 10 times (not joking) and started again.  I have the same problem every time.  I have even had myself validated with Facebook thinking that might be the problem.  I have had Wordpress look over my site and they can find no conflict.

As I said before I have tried another social login and it worked.

They also had a return URL with a "=facebook" just as the example above by WP Native Articles.  I'm guessing this is what I need to find some URL that has something referring to Facebook in it.

I have spent the last week reading all the articles about it.

 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@raine,

I'm really sorry but I have no other clue for this issue.

 

(@raine)
Joined: 4 years ago

Active Member
Posts: 10

@robert

Thanks for trying.  I do appreciate your time even though there has been no solution.

 

(@raine)
Joined: 4 years ago

Active Member
Posts: 10

@robert

Sorry, just for your reference.  I just removed the Facebook login using the forum settings and checked the page again and the Uncaught error with the SDK (screenshot above) has now gone. 

 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@raine

Not related to facebook login:

Please remove this CSS code from your website. This code affects all form elements of your website and forum. It makes tons of design problems:

input {
     height: 60px;
}

 

Then remove this custom CSS code from Forums > Settings > Styles > Custom CSS Code textarea. I think you've added this because that was affected by CSS code I mentioned above:

#wpforo #wpforo-wrap input {
      margin-top: 20px;
}

 

 

(@raine)
Joined: 4 years ago

Active Member
Posts: 10

@robert

Thanks Robert, I have removed both.  Sorry I didn't reply earlier, different timezones.