Post by Cyberdude » Tue Feb 23, 2010 4:27 am

Hi guys.

I'm almost there, but, i just don't manage to get the product id shown in facebook share.

I use this code in /catalog/view/theme/default/template/product/product.tpl :

Code: Select all

<a href="http://www.facebook.com/sharer.php?u=http://YOURDOMAIN/index.php?route=product/product&product_id=&title=$products[$j]['name']">Share it</a>
Now, it is ready to share, but, i need to define the product id and picture.

Does someone have an idea?

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by Cyberdude » Tue Feb 23, 2010 5:14 am

Ok

it works. :D

i use:

Code: Select all

<a href="http://www.facebook.com/sharer.php?u=http://yourdomain/index.php?route=product/product&product_id=<?php echo $product_id; ?>&t=<?php echo $heading_title; ?>"><img src="http://yourdomain/catalog/view/theme/default/image/facebook.gif"></a>
Only issue now is the picture. Facebook asks to choose picture.

anyone knows how to change that, so it takes image of product?

you can try on my site: Click here

There, choose a product, you will see a facebook icon(i just putted there to test)

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by Cyberdude » Tue Feb 23, 2010 6:47 pm

Ok folks,

This is what i found.

Problem is, how to define the product image?
If you want to have a custom image showing besides the link shared on Facebook, you can do it by adding a simple piece of code in your page’s header section. Facebook link sharing is one of the best way to spread your links on most powerful social community platform. You should be careful while sharing links on Facebook as that link may become a branding initiative from your side. In that case, that link should appear perfectly on other’s home page as well.

Whenever we share a link on Facebook, it actually try to retrieve some images from that particular page and show you the option to choose an image as thumbnail or select “No thumbnail”. What if the options shown by the Facebook link sharing tool is not having the proper image thumbnail? In that case you can apply the changes below to have the custom image thumbnail besides the link on Facebook.

You may also like: How To Add Blog Feed On Facebook To Share Latest Post Over There

According to the Facebook Share Documentation, Facebook takes the image provided with tag rel=”image_src” in the header section that will definitely considered in the thumbnail options on link sharing. For example, if you want to have your blog’s logo in link shared as your homepage’s URL then add the below mentioned piece of code to have logo as thumbnail in Facebook,

I added below piece of code in HEAD section of my blog i.e. header.php below wp_head,

<link rel="image_src" href="http://media.clickonf5.org/image/logo.png" />
But, how can you replace it so that it uses the thumb image of each product?

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by Cyberdude » Tue Feb 23, 2010 11:08 pm

Afther hours of looking on the net and facebook, i found this:
ShopSite custom template example

If you are using ShopSite and want to make sure this functionality exists in your “More Information” product template, you could use the following tags/code:


<meta name="title" content="[-- PRODUCT.MoreInformationTitle --]" />
<meta name="description" content="[-- PRODUCT.MoreInformationMetaDescription --]" />
<link rel="image_src" href="http://www.ABC.com/media/[-- IMAGE Product.MoreInformationGraphic --]" />
can anyone tell me if we can use it?

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by Cyberdude » Tue Feb 23, 2010 11:13 pm

I find the same thing every time, but this is when you specify a image !

I need it to take the image of the Product page.

Come on guys, this is almost working, just the product picture needs to display on facebook.

I already did the hardest part i think :D

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by fmucar » Fri Feb 26, 2010 1:36 am

Code: Select all

<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
catalog/view/theme/default/template/product/product.tpl
paste this code to product.tpl anywhere you want it to appear and then it is good to go.
Thats all.

Newbie

Posts

Joined
Fri Dec 25, 2009 4:12 am

Post by Cyberdude » Fri Feb 26, 2010 2:03 am

thanks,

but this does not fix the image problem

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by fmucar » Sat Feb 27, 2010 1:04 am

This is working quite well for me. I have no idea why it is not working for you.

Newbie

Posts

Joined
Fri Dec 25, 2009 4:12 am

Post by OSWorX » Sat Feb 27, 2010 1:53 am

The posted code is quite okay (while not optimal), cyberdude has a problem with another (addionally 3PD) installed module which send wrong imgaes to facebook.

Forum Rules [en]: viewtopic.php?f=176&t=200480
Forumregeln [de]: viewtopic.php?f=37&t=114208
Commercial Request: viewforum.php?f=88

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by MulderDSM » Mon Mar 01, 2010 12:10 pm

When I use this code:
<td><a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share on FaceBook</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></td>

FaceBook link works, but it doesn't have the Product Name in the FaceBook posting, but when you click on the link it goes to the correct page.

Is there anyway to include the Product Name and maybe some default text like "You should check out PRODUCT NAME at WEBSITE"?

New member

Posts

Joined
Sat Feb 20, 2010 9:57 pm

Post by OSWorX » Mon Mar 01, 2010 2:23 pm

MulderDSM wrote:Is there anyway to include the Product Name and maybe some default text like "You should check out PRODUCT NAME at WEBSITE"?
Yes.

Forum Rules [en]: viewtopic.php?f=176&t=200480
Forumregeln [de]: viewtopic.php?f=37&t=114208
Commercial Request: viewforum.php?f=88

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Cyberdude » Mon Mar 01, 2010 2:39 pm

Maybe tell him how :D

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by OSWorX » Mon Mar 01, 2010 5:59 pm

For all who wants to add the Facebook button to your (product) page.
At http://osworx.net (Downloads) you will find the complete modification (either copy the already modified files or edit the files manual - readme is enclosed).

Forum Rules [en]: viewtopic.php?f=176&t=200480
Forumregeln [de]: viewtopic.php?f=37&t=114208
Commercial Request: viewforum.php?f=88

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by MulderDSM » Tue Mar 02, 2010 8:53 am

Thanks, I download your mods and installed them, Facebook button still works to send to Facebook, but the Product Description still defaults back to the sight's name and not the product name.

New member

Posts

Joined
Sat Feb 20, 2010 9:57 pm

Post by OSWorX » Tue Mar 02, 2010 2:11 pm

Having any link to your site?
If the headers (title and description) are there, FB will use them.

Forum Rules [en]: viewtopic.php?f=176&t=200480
Forumregeln [de]: viewtopic.php?f=37&t=114208
Commercial Request: viewforum.php?f=88

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by priceyboy » Tue Mar 16, 2010 1:14 pm

Thank you all for helping.

I have added the 'Facebook Share' which works great, but I have a problem, in fire fox, the 'facebook popup' is in spanish ~ but when I use Internet Explore the 'Facebook popup' is in english.
I have been up all night trying to work that one out..

if any one can work it out, I will be eternally in your debt
Thanks

Priceyboy
Last edited by priceyboy on Tue Mar 16, 2010 2:09 pm, edited 1 time in total.

New member

Posts

Joined
Fri Nov 13, 2009 3:08 pm

Post by migz » Tue Mar 16, 2010 2:06 pm

thank you! O0

Active Member

Posts

Joined
Mon Feb 01, 2010 2:13 am

Post by Cyberdude » Tue Mar 16, 2010 4:12 pm

priceyboy wrote:Thank you all for helping.

I have added the 'Facebook Share' which works great, but I have a problem, in fire fox, the 'facebook popup' is in spanish ~ but when I use Internet Explore the 'Facebook popup' is in english.
I have been up all night trying to work that one out..

if any one can work it out, I will be eternally in your debt
Thanks

Priceyboy
Did you try to clear your Cache ?

Logohunt.Net, Get Amazing custom logo designs for your business in just a few Hours! Start a online logo design contest for only $29 and watch designer logos roll in the same day!


User avatar
Active Member

Posts

Joined
Wed Feb 03, 2010 10:39 pm
Location - Belgium

Post by priceyboy » Wed Mar 17, 2010 2:57 pm

Clearing the cache.. why did'nt I think of somthing that obvious!

But you were correct... Fixed :)

Thanks

Priceyboy

New member

Posts

Joined
Fri Nov 13, 2009 3:08 pm

Post by migz » Mon Mar 22, 2010 1:58 pm

It's working! Are there any icons to choose from?

Active Member

Posts

Joined
Mon Feb 01, 2010 2:13 am
Who is online

Users browsing this forum: No registered users and 11 guests