Jump to content
Dirty Butter

Need help with og:image source code

Recommended Posts

I need help making Facebook happy with my Open Graph image setting.

I've tried using this:

<link rel="image_src" href="{$PRODUCT.large}" />
<meta property="og:image" content="{STORE_URL}/images/cache/{$PRODUCT.large}"/>

I thought this would work in the element.meta.php file, but it didn't.

This would probably have been much easier before I put almost all our images in folders. That's one action I have really wished I had never done - but it's that way now.

I would prefer using the source file url, but that would be a different folder for different listings.

I've tried

<meta property="og:image" content="{$image.source}"/>

But that did not work, either.

I've managed to work out all the other Open Graph settings Facebook requires, but I'm stumped on the image.

Has anyone made this work for Facebook ?

Share this post


Link to post
Share on other sites

What does Facebook require?

On the Product front page, this has the actual full URL: {$PRODUCT.source}

(I believe so - I may have added this code to this development branch that I am looking at to answer this question.)

And what is wrong with the existing code in element.meta.php?

Share this post


Link to post
Share on other sites

It needs to be code that picks up the image url for each product, not inferred from other code on the page. I'm trying to cross the t's and dot my i's, because I'm having trouble getting Facebook to approve of an App.

I'm not sure you will see what I see from this url:

Quote

 

Edited by Dirty Butter

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×