Had the same problem and figured this out, so thought I would post my results.
The problem that everyone is happening is due to the Faceboke 'Secure Browsing' option. This requires that Facebook logins and connections use HTTPS, instead of HTTP (secure HTTP vs normal HTTP). By default, I believe online accounts is using HTTP, so this just won't work.
Because of this, we have a couple of options.
Option 1 (Insecure Solution):
Disable Facebook Secure browsing through the security interface on Facebook.com. This will disable HTTPS defaults on ALL of your Facebook pages on ALL devices, e.g. cell phones, other computers, etc. This works, but it is not the ideal solution.
Option 2 (Right Way):
We can simply request that online accounts just use an HTTPS connection, instead of an HTTP connection. To do this, we can use Derek Karpinski's previous advice (quoted below). This is essentially telling Online Accounts to try both HTTP and HTTPS. Since Facebook needs HTTPS, this is what we want. After doing his steps below, delete the Ubuntu app on Facebook (if you had previously tried and failed to add it), log out of Facebook, and close Online Accounts. You actually don't need to restart your computer, just close Online Accounts. Re-open Online Accounts and try again. and things should work fine!
Re: Ubuntu online accounts - cannot add facebook
sudo nano /usr/share/accounts/providers/facebook.provider
add this line:
<setting name="AllowedSchemes" type="as">['https','http']</setting>
right after this line: