Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   add facebook like and tweetmeme buttons (/showthread.php?t=5947)

DMAB22 December 19th, 2011 08:56 PM

add facebook like and tweetmeme buttons
 
Hi,

I'm trying to add functional facebook like and tweetmeme buttons to the the store pages. and while i can add the code to the text file on the product page module (and the buttons show up) they do not function.

any ideas on how to make them work?

Eric December 19th, 2011 10:56 PM

Hi

Welcome to the forums!

What are the requirements of that code? I'm not familiar with the code you are using so it's hard to say how to fix it.

Eric

DMAB22 December 20th, 2011 10:13 AM

i'm using the manual code from the digg digg plugin that i'm using for posts, where it works fine.

it doesn't have to be this particular code, just any code that will allow customers to like and tweet the product.

Eric December 20th, 2011 10:26 AM

Hi

Without seeing the code or knowing what parameters the functions require, it's impossible to help.

Eric

DMAB22 December 20th, 2011 11:00 AM

what about adding the code that facebook offers to developers to add the like button to a website? should i post that here? is there any way to add the facebook like button to product pages?

Eric December 20th, 2011 11:02 AM

Hi
Quote:

Originally Posted by DMAB22 (Post 27218)
what about adding the code that facebook offers to developers to add the like button to a website? should i post that here? is there any way to add the facebook like button to product pages?

Yes, you need to post the code here. Like I said, I'm sure it's possible but without seeing the code or knowing the parameters it accepts, it's impossible to help.

Eric

DMAB22 December 20th, 2011 11:31 AM

this is the xfbml code from facebook. it's supposed to default to the current page, but it defaults to the store home page instead:

added to body tag:

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

added to html tag:

<html xmlns:fb="http://ogp.me/ns/fb#">

added to the text module in the products detail view:

<fb:like href="http://designermaternityandbaby.com" send="false" width="450" show_faces="false"></fb:like>

Eric December 20th, 2011 11:35 AM

Hi

You should probably add this to your Text module:

HTML Code:

<fb:like href="[server.url type='fullpage']" send="false" width="450" show_faces="false"></fb:like>
Eric

DMAB22 December 20th, 2011 11:35 AM

also, i updated the last line of code to this: <fb:like send="false" width="450" show_faces="false"></fb:like>

but i'm still having the same problem.

Eric December 20th, 2011 11:36 AM

Did you try what I posted in post #8?

DMAB22 December 20th, 2011 11:47 AM

i did. and it creates a link to the store page not the product page.

Eric December 20th, 2011 12:26 PM

Hi

Here's the reason it's not working: /show...6388#post26388

Your canonical link in your <head> tags all point to your store's homepage. This is very bad for SEO. I'm guessing one of your SEO plugins is adding that. It should be disabled on the Store page.

Eric

DMAB22 December 20th, 2011 12:56 PM

ah, i usually don't activate the canonical url portion of the all in one seo. i've deactivated it. i'll need to clear my browser's cache to remove it from the header. i'll let you know how this goes.

thanks for your help. very much appreciated.

DMAB22 December 28th, 2011 01:04 PM

hi there,

so after removing the canonical url the product link (when added to facebook) defaults to the store front page. this is the code i'm using.

to the <head> i've added <html xmlns:fb="http://ogp.me/ns/fb#">

to <body> i've added <div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

and then I've added this to the text module in the product detail default template

<fb:like href="[server.url type='fullpage']" send="false" width="450" show_faces="false"></fb:like>

any ideas?

Eric December 28th, 2011 08:27 PM

Hi

It should be working. The source code looks fine!

Eric

roelkers January 8th, 2012 05:08 PM

Any luck getting Facebook "Like" working on your site DMAB22? Have a wordpress site and of course the Facebook Like plugin works on all other pages and posts but not the datafeedr store.

Is it as easy as adding some code to the store front and/or category pages?

Giftoly March 26th, 2012 05:44 AM

Good Morning All,

I took would like to get this working as I really want to be able to update Facebook / G+ / Twitter etc with featured products.

At the moment, liking a page as above just returns the www.giftoly.co.uk/store page and images.

I notice people are talking about turning off canonical url which as a quite a noob to WP and Datafeedr, I am not sure how to do or really the meaning. Could someone confirm how to a) turn off this feature and b) if they have managed to get social network 'liking' working at product level ?

Really appreciate your help!

John :)

Giftoly March 26th, 2012 05:47 AM

P.S

I meant to say...

these are the plugins that I have activated if anything jumps out as potentially causing the problem



and this is the Permalinks area of the Yoast SEO plugin if this is causing the canonical URL issue


Giftoly March 26th, 2012 08:31 AM

Sorry about all the posts,

Also just noticed that even through the Datafeedr breadcrumb shows full details, the WP breadcrumb stays at www.giftoly.co.uk/store

Is this partly the cause ?



[Edited]

Oops just realised screenshot is of the wrong website but cloned WP site and Datafeedr store and same issue.

Eric March 26th, 2012 08:46 AM

Quote:

Originally Posted by Giftoly (Post 30259)
Is this partly the cause ?

Possibly... We will be looking into this issue in version 3.8.


All times are GMT -5. The time now is 01:16 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.