Hello!
I want to use fb social like button for views and I have a problem. After making the view, the like button appears, but it doesn't link to the right place. It should link to mysite.com/content/1, and instead of this it points to mysite.com/1.
What can be the problem?

Thanks!

Comments

Oscar Illada’s picture

Same problem !!!!!!

ferdi’s picture

gloomcheng’s picture

According reply #2, I guess that update fb social module to version 6.x-1.0-beta6 could solve like button URL error which generate by views field.
But after I upgrade, I encountered things worse, the fb like button could not appear. So I down version to 6.x-1.0-beta5 and try to hack the module.
I found the problem is in line 70 in fb_social/modules/fb_social_like/views/fb_social_like_handler_field_like.inc file, the source code is:

'href' => fb_social_url($values->nid),

We need to change to:

'href' => fb_social_url(drupal_get_path_alias("node/" . $values->nid)),

You will get the correct URL with alias finally.

darthf1’s picture

i can confirm the above post. FB Social had some weird behaviour in views, but after changing the code it was fixed for me. Maybe it is better to use "drupal_get_alias" instead of "fb_social_url"?