The Elearning Community • Open Graph properties
Page 1 of 1

Open Graph properties

Posted: Fri Feb 22, 2019 1:23 pm
by hryhorash
Hi,

I'm trying to add OG properties to the login page so that when sharing the link via social media the appropriate data was shown. For now it does not look good :(

I've tried adding meta tags

Code: Select all

<meta property="og:title" content="TITLE" />
<meta property="og:url" content="URL" />
<meta property="og:image" content="/path-to-img" />
in /templates/standard/layout/home.php but it did not work

Any help would be appreciated

Re: Open Graph properties

Posted: Thu Feb 28, 2019 12:54 pm
by hryhorash
Maybe someone will find helpful my workaround about this issue:
1. Create a css style

Code: Select all

.hide {display:none}
in custom.css
2. Go to language settings > login > _INTRO_STD_TEXT and add link to your image as

Code: Select all

<img class="hide" src="/PATH_TO_YOUR_IMAGE">
3. Go to https://developers.facebook.com/tools/debug/sharing/ and make sure that your image is shown
4. PROFIT

Re: Open Graph properties

Posted: Thu Feb 28, 2019 1:28 pm
by max
Thank you Hryhorash for your contribution!