Forums / All Other Contributions/Addons / Where do I add facebook open graph tags?

Where do I add facebook open graph tags?

Views: 4,033

Results 1 to 6 of 6
20 May 2011, 9:10 PM
#1
surlybroad avatar

surlybroad

New Zenner

Join Date:
Mar 2010
Location:
northern california coast
Posts:
11
Plugin Contributions:
0

Where do I add facebook open graph tags?

I've added a facebook like button to my main page and it's working fine. Now I have to add the Facebook open graph tags ... but I have no idea where to place them. I read somewhere that they should be addedf to the index.php file. I did that (placing them between appropriate html opening and closing tags, etc.) but it caused a server error when I tried to access my site. I read elsewhere that it should be placed in the common header tpl file, but that didn't work either.

I've spent hours searching the forum for help on this, but I haven't found any info that relates. Any assistance would be very much appreciated.
:bangin:

21 May 2011, 8:32 AM
#2
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Where do I add facebook open graph tags?

surlybroad:

I've added a facebook like button to my main page and it's working fine. Now I have to add the Facebook open graph tags ... but I have no idea where to place them. I read somewhere that they should be addedf to the index.php file. I did that (placing them between appropriate html opening and closing tags, etc.) but it caused a server error when I tried to access my site. I read elsewhere that it should be placed in the common header tpl file, but that didn't work either.

I've spent hours searching the forum for help on this, but I haven't found any info that relates. Any assistance would be very much appreciated.
:bangin:

Click the "Free Software Add Ons" up the top of this page
You will find 4 or 5 mods there that maybe will give you inspiration.

Also it depends on what you are trying to achieve
For instance if you want each "product" to have a like button then you put the OG tags in
\includes\templates\YOUR_TEMPLATE\common\html_header.php

23 May 2011, 4:57 PM
#3
surlybroad avatar

surlybroad

New Zenner

Join Date:
Mar 2010
Location:
northern california coast
Posts:
11
Plugin Contributions:
0

Re: Where do I add facebook open graph tags?

I placed the FB like button on my main page. I'm not interested in having a like button on every product page.

I looked through the software add-ons, but didn't see one that addressed this issue. I'll look again, but I'm not hopeful. :unsure:

Thanks.

23 May 2011, 5:10 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Where do I add facebook open graph tags?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 May 2011, 2:59 PM
#5
surlybroad avatar

surlybroad

New Zenner

Join Date:
Mar 2010
Location:
northern california coast
Posts:
11
Plugin Contributions:
0

Re: Where do I add facebook open graph tags?

Thank you, Dr. Byte. :clap:
Whew! I've got it now and it's working great.

25 May 2011, 3:12 PM
#6
surlybroad avatar

surlybroad

New Zenner

Join Date:
Mar 2010
Location:
northern california coast
Posts:
11
Plugin Contributions:
0

Re: Where do I add facebook open graph tags?

For the sake of those who, in the future, may be looking for the answer to the same question I had, what i did was add the Facebook open graph tags to my custom html_header.php file. (Don't forget to back up your files before modifying them!)