Topic-icon Add Open Graph tag override directly into template override

Active Subscriptions:

None
12 years 2 months ago - 12 years 2 months ago #42216 by BettonDesign
Hi
I have a template override for article and I would like to add the open graph image override tag directly into this php file. The code that I have added is:
{SCOpenGraph image=images/portfolio/<?php echo $article_alias; ?>/01.jpg}
The echo $article_alias is there because my image names are based on the article alias.

The problem that I have is that the open graph tag is not overwritten, instead I just have the line {SCOpenGraph image=images/portfolio/my-image-directory/01.jpg} printed on my page.
Last edit: 12 years 2 months ago by BettonDesign.
The topic has been locked.
Support Specialist
First, when you add an og:image tag, you should use the full URL, including yourdomain.com/.

As for the tag not being replaced, please make sure:
1) You have the JFBCSystem plugin enabled
2) In the Social -> Misc area, if you've set an "Admin Render Key" that you are using it in the tag. Without it, the tag won't be rendered.
3) If neither of the above help, please try disabling any cache or optimization extensions to see if that helps the problem. If so, let us know and we can help get you going.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex
The problem was that I had put my Facebook admin key in the Social Tag Admin Key area which is obviously wrong. I have removed this and everything works as it should, thank you for your help :)
The topic has been locked.
Support Specialist
Awesome! I figured it was something like that :) Glad you got it going now. As always, should you need anything else, just let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It certainly isn't required, but is very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks,
Alex
The topic has been locked.