Facebook like button stripping some URL fragments

213 views Asked by At

I have several facebook "like" buttons on the same page which link to anchors of that page. They're specified like this:

<div class="fb">
    <fb:like href="<?php echo $share_url; ?>" 
             send="false" layout="button_count" 
             width="90" show_faces="false" 
             font="lucida grande"></fb:like>
</div>

where $share_url is like http://mikaelareuben.com/food/#some-anchor. The majority of the like buttons work fine, however some of them get the #some-anchor part stripped off, so the like button just links to /food.

Some of the fragments that get dropped are:

  • #kale-arugula-pine-nut-salad
  • #cumin-coleslaw
  • #roasted-red-pepper-and-avocado-salad

etc. There is nothing that I can see that is different from ones that aren't lost:

  • #green-gazpacho-with-avocado-cream
  • #butternut-squash-soup

etc. The examples of missing fragments I listed are the first three like buttons rendered on the page, but there are others which come after like buttons which work properly.

I've tried replacing the # with %23 to no avail.

This issue can be replicated straight on the page that gives you like button codes: just enter mikaelareuben.com/food/#cumin-coleslaw and note that when clicking the button it shows mikaelareuben.com/food in the flyout. Then enter mikaelareuben.com/food/#butternut-squash-soup and notice how it works properly.

What the heck is going on here?

Edit

#butternut-squash-soup no longer works! It's like there's some kind of blacklist at play here? I have no clue.

0

There are 0 answers