Open Graph properties

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

Open Graph properties

Post by hryhorash » Fri Feb 22, 2019 1:23 pm

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: 7
Joined: Fri Aug 31, 2018 12:06 pm
Version: forma.lms 2.0

Re: Open Graph properties

Post by hryhorash » Thu Feb 28, 2019 12:54 pm

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: 1992
Joined: Thu Mar 01, 2012 10:41 am

Re: Open Graph properties

Post by max » Thu Feb 28, 2019 1:28 pm

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

Post Reply