Twitter Card not available when using locale selection in url

When adding observation links, Twitter can’t access the data required when using links with ?locale=en to specify correct language version (default is english regardless of account settings). Example:

Twitter Card Validator says: “ERROR: Fetching the page failed because it’s denied by robots.txt.”

Looking html the pages look similar, correct meta tags are available.

With this problem only direct links to language version are possible (twitter doesn’t add the card, just plain url), or using default link that directs to english page and shows english names in Twitter card.

1 Like

Interesting. I guess this is an argument for specifying the locale in a subdomain or subdir instead of a “search” parameter, though I’m not sure we’re going to go that far. We can certainly make allowances for the Twitter and Facebook bots, but that also seems a bit much unless people routinely append ?locale=fr or whatever to URLs before sharing on social media. Do they? Do you?

Well, seriously I don’t know how much this is done because there’s no direct way to change the language to get that to url, possibly people take it as it is.

I just felt it weird a) to share the page and have it in twitter in default english species names, and after finding solution to get them in other languages when not logged in, I wondered b) why robots.txt even does block twitter/facebook doing that since the html-code anyway includes those neccessary tags.

Btw. The description text below page title in Twitter Card always seems to start with a word “Something.” Likely some empty field value causes this?

Hm. Well, that might be an argument for some kind of “Share” button that share’s a locale-specific URL (in addition to allowing bots to scrape URLs with locale parameters). I guess we’ll think about it. FWIW, I just made the Year In Review use the person’s locale for signed out users, so URLs like should show translated text when shared on social media.

A weird, that’s probably a bug. Will fix.

1 Like


That Year in Review like solution would seem like a natural solution to be implemented site wide, though the opportunity to choose the language in case by case basis might prove useful.

@kueda Twitter can’t now fetch image even for default url.

WARN: The image URL specified by the ‘twitter:image’ metatag may be restricted by the site’s robots.txt file, which will prevent Twitter from fetching it.

Otherwise card visible.

1 Like

Tested that it’s not copyright setting. CC BY-NC 4.0 doesn’t isn’t accessible either.

have you tried in the last 10 minutes? something that looks similar to this was just fixed.

I think that’s different because it’s iNat legacy app but I have no time to check further. In this case it’s some server side setting that prevents Twitter correctly accessing images and thus displaying complete cards withing it’s interface.


iNaturalist observation

Embedded in Twitter tweet (should display first of the images)

Note: this bug appeared just lately and is different than the original topic about localized pages that won’t be displayed as cards at all.

Seems to work now. Also original issue of localized page is now fixed/implemented, and “something” text is removed. Thanks!

1 Like

There’s still problems with this particular phrase that starts the description: occasionally text “something” but more usually a foreign species name. In this example there is a german name generated for default (english) url.