× Joomla Facebook Connect support forum

Topic-icon og:image and Virtuemart products

Active Subscriptions:

None
14 years 10 months ago #12004 by drbarnet
OG image works fine for pulling the first image of regular articles, but in virtuemart products it just does the meta for URL, Description, and Title. No og:image is defined.

Site: llanoestacadowine.com

Suggestions?

Thanks,
David
The topic has been locked.
Support Specialist
14 years 10 months ago #12010 by alzander
David,
We don't have a method to automatically fetch the first image from Virtuemart right now. You'd need to set this manually on your own, which is generally pretty simple (we think).

In the description area of the VirtueMart product, add the following tag:
{JFBCGraph image=http://site.com/link-to-image.jpg}

We know this isn't the best method when dealing with many products, and have plans to add richer Virtuemart support in a future release, but don't have the automated ability implemented yet.

Hope this helps, but if you have any other questions, just let us know.

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

None
14 years 10 months ago #12014 by drbarnet
That was great! I actually placed it in my flypage template and borrowed the php code to set the thumbnail image based on that product.

Here is the code in case someone needs an example:
{JFBCGraph image=http://llanoestacadowine.com/components/com_virtuemart/shop_image/product/" border="0" alt=""}

Thanks,
David
The topic has been locked.
Support Specialist
14 years 10 months ago #12016 by alzander
David,
Glad we could help. I'd recommend removing the border and alt tags. Facebook doesn't accept them, and we actually ignore them when translating to the proper Open Graph image tag. It shouldn't cause any problems, but just best to not have unnecessary stuff.

Just so you know, you can add the tag for title and description using the code you have as well:
{JFBCGraph title=<?php echo $product_name ?>}
{JFBCGraph description=<?php echo $product_description ?>} (I think that's what it is in VM.
and possibly even set the 'type' of page that the product is (see developers.facebook.com/docs/opengraph/#types):
{JFBCGraph type="product"}

Definitely appreciate the post back of what worked for you. We try to make it easy even if it's not automaed, but we will be doing this in an automated fashion in a future release.. just likely not for a few months... you should be set till then with the above code though :)

Finally, after you've played with JFBConnect a bit, please consider leaving a rating and review on the Joomla Extension Directory. It's certainly not required, but very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks, and good luck,
Alex
The topic has been locked.