I've been trying the debugger at https://developers.facebook.com/tools/debug/sharing/. Facebook's scraper evidently doesn't have a defined location, so the country is getting set to XX. That's causing the message we set for T151411 to show up.
Any idea how we can have Facebook not cache the link with country=XX in?
Let's update Special:FundraiserRedirector to use the GeoIP cookie when the country code on the URL is invalid - it currently ignores the cookie if there's any country param in the querystring.
I successfully posted a few days ago. I'm posting the expeced result below . Also props to whoever setup the url for the link back. That's super helpful for tracking.
I've never seen a geolocation bug on an FB post. I understand that one can set the specific text and images for the post. Is our bug an i18n issue? If so, will the url change for that user as well?
If we get this fixed, how difficult will it be to adjust the image or text? We might want to run this by comms and adjust copy and art for the current campaing.
The problem is that Facebook scrapes links, and caches what it finds to show in previews. When no country is specified in the URL, Facebook's scraper geolocates to 'XX' so is seeing the message we added for T151411. Then it uses that message in the preview for everyone. I don't really want to remove that message completely since it is an issue for some donors.
It works fine when sharing a link with the country specified in the URL. However we don't want people to do this, as their friends might be in other countries.
Additionally trying to tweak these previews is a case of trial-and-error. Facebook really want everyone to be using Open Graph tags, which we can't do since we have no way to edit the page <head>. Their scraper can generate previews without those tags which is how we do it at the moment, but the behaviour is undocumented and unpredictable.
Okay, I've made the https://donate.wikimedia.org/?country=XX page have the same appeal content as a normal donation page, moving the error into the form. Forced re-scraping of https://donate.wikimedia.org/ and the URL on the Thank You page, and it seems to have done the trick. Preview content is back to what it was previously.