I set the OG image as a direct URL path to the image i want to use, however, using it with a standard Facebook Like Button doesn't work. Is there something I'm doing wrong? The source shows the meta property is OG image and the content is the correct path so this module is indeed adding that. But when pressing a like button Facebook always retrieves a paypal image in my footer instead of the OG image.

Comments

RKS’s picture

I just saw now that OG description isn't carrying over at all. I have a contest with a like button and when clicking like it just shows up with a Paypal image and node:title of "win such and such." It looks like spam without the OG items coming through. Does perhaps something block this?

arkjoseph’s picture

Can you post what code you have so far? I am also implementing the like button on a project very soon.

I plan on doing this on a per node basis tho. Does anyone have thoughts or examples of a like button unique to a node?

bkosborne’s picture

I wonder if this happens because the the HTML attribute for facebook is missing from this module. I notice that in metatag_opengraph_preprocess_html, the open graph attribute is added (if RDF didn't) but not the facebook one.

See this page for more information: https://developers.facebook.com/docs/opengraphprotocol/

Can someone try adding that into their HTML attribute to see if that fixes it?

berdyshev’s picture

I have configured OpenGraph tags using Metatag OpenGraph module, so og:image has correct value - the image from article. But LikeButton uses another image (banner) from the footer. I can't understand why it do so.

recidive’s picture

That's because metatag module is adding the rel attribute to the image, but not a "og:image" meta tag to the head section.

berdyshev’s picture

2 recidive: no, it adds "og:image" for me to the head section.

recidive’s picture

Interestingly, it doesn't do it for me. I have it set to [node:field_image].

finex’s picture

@recidive: I'm experiencing your same behaviour: I've the rel="og:image" on the image field but nothing is printed on the head section. I'm investigating :-)

EDIT 1: I've found the problem: In my specific case the open graph tags works on the default Drupal 7 theme but not with an Omega subtheme, probably some themes could conflict with meta tags module.

EDIT 2: Using the base Omega theme meta tags works fine, even the Open Graph tags. Probably the subtheme is broken. @recidive: you should try to check your theme too.

recidive’s picture

@FiNeX, yes I'm using a omega subtheme to.

Please tell me if you have any progress on this. Thanks!

finex’s picture

@recidive: after some testing I've find out that meta tags are not printed only when you're using a specific template for a content type.

EDIT: it looks like a Meta Tags bug, http://drupal.org/node/1310780

jospBln’s picture

Category: support » bug

I'm also using omega. It works for my startsite but for a node I use a different omega subtheme with delta. And on this one there is no og:image tag.

finex’s picture

@jospBln: did you add

render($content['metatags']);

like wrote on http://drupal.org/node/1310780 ?

jospBln’s picture

I would love to, but unfortunately I'm not sure where I should put it in a subtheme I created with the delta module.
Could you give me a hint where I find or should create the template, please?

finex’s picture

Just add it on top of of node templates, like node--article.tpl.php

damienmckenna’s picture

Title: Open Graph Image not working with Facebook Like Button » Update Open Graph tags, e.g. Image not working with Facebook Like Button
Issue tags: +D7 stable release blocker

Updated the title. Also this needs to be fixed for the initial stable release.

damienmckenna’s picture

Related: work on a sandbox for improving the Image tag: #1284810: Document how to handle images properly

damienmckenna’s picture

Related: similar issue for Nodewords (D6): #1553490: Update & improve the OpenGraph implementation

dave reid’s picture

Status: Active » Fixed

I'm not seeing a specific bug here aside from #1310780: Metatags not working on overwritten templates. If there is and I missed it somehow, please re-open and edit the Issue summary appropriately.

Automatically closed -- issue fixed for 2 weeks with no activity.