Jump to content

Block Share Module


Recommended Posts

Hello,  My Block Share module has worked perfectly for months and now it is not showing the photo of the product when I go to share/publish it on Facebook.  It will only show a side photo on my site, not the product I am linking to.  I need help, I use this module daily, it is a wonderful tool.

 

I went to the FB Object Debugger, but this did not help: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.artistbearsinternational.com

 

My site:  http://artistbearsinternational.com/index.php

Edited by ABI International (see edit history)
Link to comment
Share on other sites

It is on the Product itself.  When I go to the FB share (see the string of options next to the product photo) and click FB to share, the product photo no longer shows up, only a random side photo.  ALSO, if I refresh that FB share before sending it, it switches photos to another product...but the wrong one.  This was working before and I have not altered anything to my site.  Very frustrating because we heavily promote the one of a kind products all day long and when the wrong photo shows...it is bad for business.  

 

In the photo attached, the bear is a pink reindeer, but you can see the photo that shows up is not the product but an ad on the left.

Edited by ABI International (see edit history)
Link to comment
Share on other sites

each product in your store have got the same picture defined:
zZa1gfH.png

 

you have to use url to product image in og:image tag, there is no other way to achieve that.

 

it will be much easier for you if you will use open graph module, without it will be a bit hard to achieve (a lot of modifications)

  • Like 1
Link to comment
Share on other sites

you have to create module, or modification of template file: header.tpl

 

between <header></header> tags you have to add if conditions to check what page customer browse, with something like:

{if $page_name=='product'}
<meta property="og:image" content="{$link->getProductLink($smarty.get.id_product)}">
other
meta
tags
here
{/if}

and you will have to create something similar for each page type in your store, to define open graph tags for it.

  • Like 1
Link to comment
Share on other sites

We tried the code above.  It is still not working.  

 

Are you saying...this is from my friend:  "The way I understand it is that we would have to write a line of code like the one I put in for each and every product image. So each line of code would call a specific image assigned to a specific product.?"

Link to comment
Share on other sites

this is why i suggested to create 

{if $page_name=='product'}
<meta property="og:image" content="{$link->getProductLink($smarty.get.id_product)}">
other
meta
tags
here
{/if}

it will create links to product picture (cover) automatically for each product.

 

after changes, you have to debug product url with facebook debugger. otherwise you will see changes after some time (facebook has got cache)

  • Like 1
Link to comment
Share on other sites

instead of function $link->getProductLink use $link->getImageLink

function definition:

/**
	 * Returns a link to a product image for display
	 * Note: the new image filesystem stores product images in subdirectories of img/p/
	 *
	 * @param string $name rewrite link of the image
	 * @param string $ids id part of the image filename - can be "id_product-id_image" (legacy support, recommended) or "id_image" (new)
	 * @param string $type
	 */
	public function getImageLink($name, $ids, $type = null)
  • Like 1
Link to comment
Share on other sites

Thank you Vekia.  We tried:  instead of function $link->getProductLink use $link->getImageLink.  It is still not working.

 

I notice that when we try to link on Pinterest, we get the product photo on an option list but all of the irrelevant others are listed above it.  (See attached).

 

This seems like a small issue but it is killing my business.  The artists publish their items all over social media and to not have their photo of what they are selling is a disaster.  Other sites link it perfectly.  Even if they use the URL, the photo of the product will not show up.  

 

I also looked here:  http://support.addthis.com/customer/portal/questions/1495488-my-addthis-share-block-for-prestashop-1-5-not-showing-up-images-in-facebook

 

ALSO...I wrote to the people who created that module.  They said:  "Facebook doesn't work like the other AddThis buttons. Instead of accepting parameters that we pass it, Facebook requests the URL you're sharing and gets the data it displays from the meta and link tags in the header. To control how your page is shared on Facebook you should use OpenGraph tags which are described in Facebook's documentation here: http://developers.facebook.com/docs/opengraph/"

 

I really need help.

Edited by ABI International (see edit history)
Link to comment
Share on other sites

 

 

ALSO...I wrote to the people who created that module.  They said:  "Facebook doesn't work like the other AddThis buttons. Instead of accepting parameters that we pass it, Facebook requests the URL you're sharing and gets the data it displays from the meta and link tags in the header. To control how your page is shared on Facebook you should use OpenGraph tags which are described in Facebook's documentation here: http://developers.facebook.com/docs/opengraph/"

 

 

this is why i said about facebook open graph modules. if problems like this "killing your buisness" why not to use module? it will solve your problems definitely.

Link to comment
Share on other sites

As I said before...it is NOT just the module. If someone just shares the URL page of the product the wrong photo shows up. Yes, it is common sense to get rid of the module but it still does not solve the problem. We changed the code as you mentioned above but it is still not working.

Link to comment
Share on other sites

As I said before...it is NOT just the module. If someone just shares the URL page of the product the wrong photo shows up. Yes, it is common sense to get rid of the module but it still does not solve the problem. We changed the code as you mentioned above but it is still not working. 

 

My friend who makes the code changes for me says he is unable to do this for me, it is beyond his knowledge.   I got this from the AddThis (see below) and this is what you have been saying Vekia as well.

 

 

"Facebook doesn't work like the other AddThis buttons. Instead of accepting parameters that we pass it,  Facebook requests the URL you're sharing and gets the data it displays from the meta and link tags in the header. To control how your page is shared on Facebook you should use OpenGraph tags which are described in Facebook's documentation here: http://developers.facebook.com/docs/opengraph/"

 
Can anyone help me with correcting this?
Edited by ABI International (see edit history)
Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...