Open Graph

Expected Behavior Open Graph

Open-Graph-Metatags shall deliver information to Social bots when page is loaded.

Current Behavior Open Graph-Issue

Regretfully, the open Graph Metatag-Information will only be regarded if that information is hardcoded into the HEAD-Tag, but not so, if a Mod is placed into the body-tag . The Mod will render the relevant information into the meta-tags in the head-section after V2-Script was loaded, which is too late for the social bots to read the OG-Tag_Information.

Failure Information (for bugs)

I did make sure the Open-Graph-mod is loaded with priority, (and I double-checked the Content is rendered into the Meta-tags correctly on pageload) the Meta-tag information will still not be considered by the social bots though. My assumption is, that social bots will only consider Open-Graph-Meta-Tag-Information if it is available in a hardcoded fashion inside the head right away. Do you agree on this? Can you see a workaround for me to use? The Goal is to enable my client to manage the Open Graph Information themselves, rather than me hardcoding that Data into each Head-Tag on each Page manually.

Steps to Reproduce Open Graph-Issue

MOD-Version Testpage:
This is a TEST-PAGE WITH Open Graph-Infomation rendered into the head via ANYMOD
https://skysails-yacht.com/mit_mod.html

Hardcoded Version Testpage without Open Graph MOD:
Whereas here the Open Graph-Infomation is written into the head HARDCODED

Please find the relevant open graph mod here (Tyler is a Teammeber of the project): https://anymod.com/mod/imprint-open-graph-information-llrmdb
https://anymod.com/projects/8P74P9/dashboard

This is what you need to do to recreate the issue:

  1. call this validator: https://cards-dev.twitter.com/validator
  2. Enter the following URL into the formfield there https://skysails-yacht.com/mit_mod.html
  3. realize the Open Graph Info will be disregarded
  4. realize the OG will be delivered if hardcoded by entering this url into the formfield: https://skysails-yacht.com/ohne_mod.html

You may also try this Testtool on: Facebook debugger

My open Questions

Do you think a serverside caching might help to workaround this issue? I hoped for the AnyMod-Serverside-Cache to maybe help workaround the above decribed issue, but in fact I am almost sure it of cause cannot help to workaround, as the relevant code will probably have to be simply hardcoded into the head to be regarded via the social bots reading the page in order to create that socalled open Graph.

The only approach that comes to mind to workaround this issue, is to make sure the Open-graph metatag-information is provided right away on Pageload inside the head-section. Do you see any approach to render the metatags into the html successfully in a way to the social-bots would regard the code?

Can you think of any approach to help the social bots regard the Open-Graph-Meta-Tags even if they are renderend into the head via V2? This is the relevant project name: 8P74P9 and Mod name: llrmdb. = https://anymod.com/mod/imprint-open-graph-information-llrmdb

Project Server-Cache:
https://anymod.com/projects/8P74P9/pages

Project Server-Cache towards the relevant page:
https://edit.anymod.com/6GqBm

Screeshot towards the relevent entry:

Hi Stefan,
This is not an issue with Open Graph per se: the problem is that Facebook and Twitter both don’t run JavaScript when fetching a page for their preview cards. So you are correct that you will need to hard code the values in the HTML in order for them to show on those platforms.

Google does run JS, so that’s why it will show in search results. FB has announced that they will start doing it eventually, but haven’t done so yet. I don’t believe Twitter has made an announcement yet.

1 Like