Topic: og meta tags and includes

Hello,

Just wondering if anyone has any input on this.

I have edited "blog/themes/simpler/templates/default.bit" and placed two includes for a custom header and footer. Everything is working ok, however I am having trouble sharing posts on facebook. I used facebooks open graph debugger to help me narrow down the issue and noticed that because of my includes, the og meta tags are falling inside the body tag and are not displaying the correct image when I share on facebook.

I took all of the code from "blog/plugins/open_graph/plugin.bit" cut it from the file and save it and then copied it into my header I am including but that did not work either.

Is there an easy way that I can incorporate the blogs og meta tags into my custom header that is one directory up from the blog?
"include '../blog-header.php'; "

Re: og meta tags and includes

I think I am getting closer, I removed this "<?php echo Blog::meta_tags(); ?>" from "blog/themes/simpler/templates/default.bit" and placed it in my header I am including, but it only shows the blogs meta tags and not the og meta tags, they are still in the body...? Anyone happen to know where or what tag is used for the og meta tags so I can include them in my custom header?

Re: og meta tags and includes

I have added this to my custom header:

<?php
echo Blog::meta_tags();
echo Blog::css(array('normalize.css', 'main.css', 'post.css', 'page.css', 'plugins.css', 'rainbow.css'));
echo Blog::jquery();
echo Blog::javascript('rainbow-custom.min.js');

echo $plugin->blog_head();
?>

All of my calls to the blogs meta tags, css and js are working right and are now in the head and not in the body, but the og meta tags are still in the body and not in the head...grrr

Re: og meta tags and includes

Apparently this works:

<?php
echo Blog::meta_tags();
echo Blog::css(array('normalize.css', 'main.css', 'post.css', 'page.css', 'plugins.css', 'rainbow.css'));
echo Blog::jquery();
echo Blog::javascript('rainbow-custom.min.js');
foreach($plugins as $plugin)
    {
        echo $plugin->blog_head();
    }

?>

However on the facebook debugger tool it is still calling for:
<meta property="og:image" content="/blog/admin/templates/default/css/img/mrnibbler128.png" />

which doesnt work...

Re: og meta tags and includes

<meta property="og:image" content="http://domainname.com/blog//blog/admin/templates/easy4/css/img/mrnibbler128.png">

Not sure why I cannot get this to work, in the url above there are two // and two blog folders appearing in the image call as well as the wrong image?

I have played around with the site settings and removed /blog/ from the blog base path and changed it to / and have tried a lot of other thing to try and get it to work with no luck.

Any input would be greatly apprecieated...

Thanks,
Don

Re: og meta tags and includes

So after spending the entire day trying to get this to work, I have found that this script will not share an image on facebook. What a complete waste of my time.

I have just installed a fresh copy of this script on my server, without customizing it all, installed every theme available in which only a couple have the option already built in to share on facebook and none of them work. I also used facebooks debugger tool and it throws an error each time.

7 (edited by Kludge 24-11-2015 19:39:58)

Re: og meta tags and includes

Maybe this is only a small and unprofessional solution for your problem. http://forum.nibbleblog.com/viewtopic.p … 3813#p3813