SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2007
    Posts
    130
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to fix Facebook Likes not counted with #anchor in URL?

    Hi, I use the fb like button on my website and recently I added an anchor link that links to the comment part of my articles...

    When someone clicks that anchor link the url looks like "nuafvallen.nl/zumba#anchor" instead of just "nuafvallen.com/zumba" (the original url).

    The problem with this is that the like is not added to the original url if someone clicks the fb like button after the #anchor is added to the url. Instead the url with the anchor added (nuafvallen.nl/zumba#anchor) is liked. So then I have likes for 2 different pages which are actually the same :S

    Is there a way to fix this?

    You can see the problem in action here: http://www.nuafvallen.nl/met-zumba-afvallen (just add "#comment" to the url and refresh, the like will disappear).

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,207
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Is it really likely that many people will click the Like button after clicking the comments link? I can only see that link down at the comment section sitelf, unless I'm missing something, so I don't see the use of it.

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2007
    Posts
    130
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Is it really likely that many people will click the Like button after clicking the comments link? I can only see that link down at the comment section sitelf, unless I'm missing something, so I don't see the use of it.
    Yes because soon I will introduce a comment button that will be placed before the facebook like button.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,207
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    To be honest, I don't see the point of a Like button anyhow. There is growing evidence that no one cares what you "like". It's more powerful to share content from a site. Rather than use any JS at all, I just include a share button that' has this basic coding:

    Code:
    http://www.facebook.com/share.php?u=[URL]&title=[title]
    You just need to insert the page URL and title dynamically into the [url] and [tile] positions. I tested it myself, and this setup doesn't post the extra #comments part of the URL, even if you've clicked on that.

  5. #5
    SitePoint Zealot
    Join Date
    Jan 2007
    Posts
    130
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks, i will look at that. Do you have a link to your site where i can see that setup of yours in action? I will test this out on my site later, thanks for the suggestion of using share instead of like, interesting.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,207
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    It's pretty low tech, but I wrote about it here:
    http://pageaffairs.com/web/html/bookmarking-without-js/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •