Creating Open Graph tags with Meta Tag Manager in JR

researchcooperative
@researchcooperative
6 years ago
694 posts
JR Documentation has a good step by step guide for using the meta tag manager.

This led me to check my site using the Facebook "Sharing Debugger" page (rude as that may sound).

I added og:url, og:title, og:type, etc tags to my site, reset caches, went back to Facebook, asked for my site to be "scraped" again, then found that the changes had been made.

But then, in the Facebook Debugger warnings panel, I see this:

Tag specified as 'name' instead of 'property'. The following meta tags are specified using 'name' instead of 'property' and will be ignored unless specified using the 'property' key: og:url, og:title, og:type, og:description, og:image

Hmmm... in Meta Tag Manager, all the Open Graph (og) items are listed in a column called "Name". There is no "Property" column for the og items.

Does this mean I cannot actually make effective Open Graph tags?

Or is there actually no problem, and the Facebook Debugger warning can be ignored?


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)

updated by @researchcooperative: 09/02/18 11:57:49AM
michael
@michael
6 years ago
7,695 posts
What you're after is the 'item_index_meta.tpl' file that is in most of the profile based modules. It has all the og:stuff tags and is included in the detail pages when the jrMeta module is active.

--edit--
and the 'item_detail_meta.tpl' for the detail pages.
updated by @michael: 05/27/18 03:49:25AM
PatriaCo
PatriaCo
@the-patria-company
6 years ago
349 posts
Twitter uses: name=
But everything else needs to be: property=

This module needs to go back to the shop for an upgrade, as it can no longer use {$variables}

Here is an example SEO markup from a WP website:
<!-- This site is optimized with the Yoast SEO plugin v7.5.1 - https://yoast.com/wordpress/plugins/seo/ -->
<meta name="description" content="Not all Alabama Electricians are created equal, let us help you find the right Alabama Electrical Contractor for your project."/>
<link rel="canonical" href="https://quality-trades.com/alabama-electricians" />
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Alabama Electricians - QT-CD Project Management Inc" />
<meta property="og:description" content="Not all Alabama Electricians are created equal, let us help you find the right Alabama Electrical Contractor for your project." />
<meta property="og:url" content="https://quality-trades.com/alabama-electricians" />
<meta property="og:site_name" content="QT-CD Project Management Inc" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:description" content="Not all Alabama Electricians are created equal, let us help you find the right Alabama Electrical Contractor for your project." />
<meta name="twitter:title" content="Alabama Electricians - QT-CD Project Management Inc" />
<!-- / Yoast SEO plugin. -->



--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 05/27/18 11:43:55AM
PatriaCo
PatriaCo
@the-patria-company
6 years ago
349 posts
I added this into meta.tpl in order for things to work more dynamically.

<meta property="description" content="Not all {$page_title|default:"`$default_title`"|capitalize} are created equal, let us help you find the right contractor for your project. Free professional listings and helpful tips.">
<meta name="twitter:description" content="Not all {$page_title|default:"`$default_title`"|capitalize} are created equal, let us help you find the right contractor for your project. Free professional listings and helpful tips.">
<meta property="og:description" content="Not all {$page_title|default:"`$default_title`"|capitalize} are created equal, let us help you find the right contractor for your project. Free professional listings and helpful tips.">
<meta name="twitter:title" content="{$page_title|default:"`$default_title`"|capitalize} - Quality-Trades.com - Local Contractors Near Me">
<meta property="og:title" content="{$page_title|default:"`$default_title`"|capitalize} - Quality-Trades.com - Local Contractors Near Me">
<meta property="og:url" content="{$current_url}">



--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
brian
@brian
6 years ago
10,143 posts
PatriaCo:
This module needs to go back to the shop for an upgrade, as it can no longer use {$variables}

I am not sure what you mean here - all JR templates can use $variables.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
PatriaCo
PatriaCo
@the-patria-company
6 years ago
349 posts
Sorry for the hasty statement.

When creating a new meta tag here:

/metatag/browse

The Tag Content prints, {$var} literally as {$var}. The module is not replacing {$var} with the variable data.

HTH


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
brian
@brian
6 years ago
10,143 posts
A variable can only be replaced with a value if the core knows what it is - if you add $var to a meta tag, how are you getting the data into the tag so it can be replaced?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
PatriaCo
PatriaCo
@the-patria-company
6 years ago
349 posts
In the example I added above, all of those variables are available to meta.tpl. One of the main reasons for bringing this up is due to the documentation: https://www.jamroom.net/the-jamroom-network/documentation/modules/2914/meta-tag-manager

The tip that I added 2years ago is no longer valid. However, I wish the meta-tag module still offered this flexibility.

Thanks :)


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
brian
@brian
6 years ago
10,143 posts
We've not removed any functionality from the meta tag manager that I am aware of. I'll need more clarification on what the "tip" is before I can comment - I really don't know what you mean.

Note that $variables in meta tags are only available on profile pages - that's how it has always been (not sure if that is what you are talking about or not).


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
PatriaCo
PatriaCo
@the-patria-company
6 years ago
349 posts
Ahhh, that was the detail that I did not understand.

Therefore, the workaround that I added above is the only thing that can currently be done for pages made with site builder.

Correct?

PatriaCo:
I added this into meta.tpl in order for things to work more dynamically.

<meta property="description" content="Not all {$page_title|default:"`$default_title`"|capitalize} are created equal, let us help you find the right contractor for your project. Free professional listings and helpful tips.">
<meta name="twitter:description" content="Not all {$page_title|default:"`$default_title`"|capitalize} are created equal, let us help you find the right contractor for your project. Free professional listings and helpful tips.">
<meta property="og:description" content="Not all {$page_title|default:"`$default_title`"|capitalize} are created equal, let us help you find the right contractor for your project. Free professional listings and helpful tips.">
<meta name="twitter:title" content="{$page_title|default:"`$default_title`"|capitalize} - Quality-Trades.com - Local Contractors Near Me">
<meta property="og:title" content="{$page_title|default:"`$default_title`"|capitalize} - Quality-Trades.com - Local Contractors Near Me">
<meta property="og:url" content="{$current_url}">



--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
michael
@michael
6 years ago
7,695 posts
look at the modules for any templates titled ?????_????_meta.tpl . those are setup to have variables available for the currently created page.
brian
@brian
6 years ago
10,143 posts
PatriaCo:
Therefore, the workaround that I added above is the only thing that can currently be done for pages made with site builder.

Correct?

There's no "variables" in a site builder page that are usable at the page level - you can't think of a site builder page the same as a template - they are constructed very differently.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
derrickhand300
@derrickhand300
6 years ago
1,353 posts
Don't know if this "helps" but I think using site builder you can select page config- then add code to the header of the page
I use something similar and keep a copy of the OG Tags on my desktop looks like this
                                              <!-- Facebook OG -->
    <meta id="ogtitle" property="og:title" content="MY TITLE"/>  
    <meta id="ogdescription" property="og:description" content="MY DESCRIPTION"/>
    <meta id="ogimage" property="og:image" content="https://www.mysite.com/upimg/image/upimg_file/2126/800"/>
    <meta id="ogurl" property="og:url" content="https://www.mysite.com/roughneck-city/oilfieldnews/1208/the-new-tech-that-terrifies-opec"/>

Then i copy my title into the file- then my description- then my image url ( by right clicking in chrome and selecting "copy image address" - even if the image you use is small you can fool FB into making it large by using/800 at the end of the image file url) Then I paste in the url

I "think" you should be able to add this to the "HEAD" section using site builder

Its quick and gives me more control over how facebook shares the page...of course you will have to run it the url through Facebook debugger 2-3 times to see the display with image
Capture.JPG
Capture.JPG  •  118KB


updated by @derrickhand300: 06/04/18 09:08:07AM