Facebook Like shows Wrong Image

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
webmaz
Lieutenant (LT)
Lieutenant (LT)
Posts: 52
Joined: Wed Apr 14, 2010 3:57 pm

Facebook Like shows Wrong Image

Post by webmaz » Thu Aug 30, 2012 11:40 am

I'd like to place the Facebook Like button on my company's product pages, but it is using an image in our header in place of the product image.

I tried using the SocialMediaLinks ConLib reference (files are from the link below) on the Show Product 1 Scriptlet. I’ve also tried using the Facebook Like button from Plugables and the result is the same (using the image from the header).

SocialMediaLinks ConLib: http://blog.ablecommerce.com/social-med ... ebar-links

I know Facebook uses Open Graph for specifying the image URL, but I'd like to do this for every product page. Is there a variable or something that can dynamically generate the image URL?

Thank you.

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

Re: Facebook Like shows Wrong Image

Post by david-ebt » Thu Aug 30, 2012 1:27 pm

Take a look at this post. See if helps.

viewtopic.php?f=44&t=16121&p=68904
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

webmaz
Lieutenant (LT)
Lieutenant (LT)
Posts: 52
Joined: Wed Apr 14, 2010 3:57 pm

Re: Facebook Like shows Wrong Image

Post by webmaz » Fri Aug 31, 2012 10:00 am

Thank you for your help David.

Let me make sure I've got the steps correct:

1. Save the provided code as FaceBookTags.ascx (Does this need any additional code or can I use what you wrote verbatim?)
2. Call out the ConLib file in the Show Product 1 scriptlet (In the Header Section or the Content?)

Question: Do I use this code in addition to a Facebook Like button? (either from Plugables or Able in my previous post)


Thanks again

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: Facebook Like shows Wrong Image

Post by crazyjoe » Mon Oct 15, 2012 10:18 am

I have been having this same issue. I use the Social Media conlib plugin thing and this only happens with Facebook (which is by far the most important). Pinterest and Google+ all work perfectly, showing the product image. I created the FaceBookTags.ascx file and I called it at the top of the content section of my Show Product 1 scriptlet. I still only get my logo graphic and it will not pull my product image. Let me know if anyone has any ways to fix this or troubleshoot it better.

Thanks!
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: Facebook Like shows Wrong Image

Post by crazyjoe » Mon Oct 15, 2012 3:06 pm

After some trial and error I found the spot in the code that was giving me the issue.

I changed line #30 from my FacebookTags.ascx from
ogImage.Content = _Product.ImageUrl;
to
ogImage.Content = Token.Instance.Store.StoreUrl + _Product.ImageUrl.Replace("~/",null);
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

Post Reply