Message Boards
Open Graph Meta Tags
Ravi Shah, modified 9 Years ago.
Open Graph Meta Tags
Junior Member Posts: 59 Join Date: 1/2/14 Recent Posts
Hi Everyone,
I am trying to put some open graph meta tags in Liferay's theme. I have used below code:
and this $titleCamp is set in the init_custom.vm file as:-
Session values are being set from Controller.
The issue here is Facebook is not able to recognize this $titleCamp value. But when i do inspect element in my html page, from that I can see that for og:title tag values are getting set properly. Then why Facebook is not able to parse it.
Is there any other way to pass the velocity variables in open graph tags ? Please help me on this.
I am trying to put some open graph meta tags in Liferay's theme. I have used below code:
<meta property="og:title" content="$titleCamp" />
and this $titleCamp is set in the init_custom.vm file as:-
#set($titleCamp=$request.getSession().getAttribute("LIFERAY_SHARED_CAMPAIGN_TITLE"))
Session values are being set from Controller.
The issue here is Facebook is not able to recognize this $titleCamp value. But when i do inspect element in my html page, from that I can see that for og:title tag values are getting set properly. Then why Facebook is not able to parse it.
Is there any other way to pass the velocity variables in open graph tags ? Please help me on this.
Julio Camarero, modified 9 Years ago.
RE: Open Graph Meta Tags
Liferay Legend Posts: 1668 Join Date: 7/15/08 Recent Posts
Ravi Shah, modified 9 Years ago.
RE: Open Graph Meta Tags
Junior Member Posts: 59 Join Date: 1/2/14 Recent Posts
Hi Julio,
I am using this tool for debugging. But I don't see any errors for title that i am passing as velocity variable.
I am using this tool for debugging. But I don't see any errors for title that i am passing as velocity variable.
Julio Camarero, modified 9 Years ago.
RE: Open Graph Meta Tags
Liferay Legend Posts: 1668 Join Date: 7/15/08 Recent Posts
Can you show me your html in the developing tools? Are you escaping the value?