Fixed Facebook Validator does not allow - characters

rfc0001

Well-known member
Affected version
XF 2.0.4
If you enter a Facebook Page with "-" characters for your Facebook Identity you get error:

1521400595818.webp

However, "-" are valid characters for Facebook Pages.
 
You are only considering usernames, not Pages. "-" is allowed in page names. Page names work just fine with the XF Facebook Validator, so seems it should work with page names with hyphens as well. The reason you would want to use a Facebook Page URL is to link to the Facebook Page for your site (or sponsor sites, etc.).
 
I tested it with a page. Pages have usernames too, and that's the part that appears in the URL, and hyphens are not allowed. The page I linked to is the documentation for both page and profile usernames:
When you create a custom username for your Page or profile

Do you have any examples of where they're allowed?
 
Well that's just stupid, if they don't allow those characters as per their own guidelines, why auto-generate them.

To be fair, though, this was never designed to be used for Facebook pages - it's really for a forum user's personal Facebook profile, though we'll consider what changes can be made for the next release.

If you create a page for a company with spaces in it, Facebook automatically puts hyphens in it:
In this case, does it always have a string of numbers (the profile ID). This must be the "pre-custom-username" state which may mean we can adjust the validator to only accept invalid characters if it ends with a profile ID or something similar.
 
Well that's just stupid, if they don't allow those characters as per their own guidelines, why auto-generate them.
Agree their guidelines need updated to reflect this.
To be fair, though, this was never designed to be used for Facebook pages - it's really for a forum user's personal Facebook profile, though we'll consider what changes can be made for the next release.
Understood, but makes sense for staff to use their site's facebook page to promote their site, and for sponsors, etc. Like I say, it already works for company pages without hyphens, so seems like it should work consistently for all pages.
In this case, does it always have a string of numbers (the profile ID). This must be the "pre-custom-username" state which may mean we can adjust the validator to only accept invalid characters if it ends with a profile ID or something similar.
Good catch. Looks like that is the case - you can just strip the text and hypens out and leave the number at the end and it works.
 
Top Bottom