Open Graph properties

Install and configure FormaLMS and DoceboCE
Post Reply
hryhorash
Newbie
Posts: 8
Joined: Fri Aug 31, 2018 12:06 pm
Version: forma.lms 2.0

Open Graph properties

Post 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

hryhorash
Newbie
Posts: 8
Joined: Fri Aug 31, 2018 12:06 pm
Version: forma.lms 2.0

Re: Open Graph properties

Post 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

User avatar
max
FormaLms Guru
Posts: 2153
Joined: Thu Mar 01, 2012 10:41 am
Version: forma.lms 2.4
Contact:

Re: Open Graph properties

Post by max »

Thank you Hryhorash for your contribution!
---------------------
Massimiliano Ferrari
Elearnit - Elearning e Knowledge Management
https://www.elearnit.net
https://www.linkedin.com/in/massimilianoferrari
m.ferrari[at]elearnit.net
Skype: m_ferrari_it

Post Reply