views:

25

answers:

1

Hello!

I'm having problems with integrating the Facebook Like button. My website is being restricted by a cookie ( meaning that the user has to go through a age verification page before getting into the actual site ).

I have all the required meta tags in the pages header, everything's good!

My problem is the following: when I integrate the like button on one of the pages and I click it, Facebook is not picking up any of the meta tags - so no thumbnail, no description, no title, just the actual link and that's it!

I've tested the Like button after removing the cookie restriction and it worked as it should.

<script>
  window.fbAsyncInit = function() {
    FB.init({   appId: '158419700854111', 
                status: true, 
                cookie: true,
                xfbml: true
            });
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

I also have the above code on my pages, so the cookie support is enabled.

Did anybody encounter the same issue? What's the possible fix?

A: 

I would suggest disabling cookie check if a request comes from facebook. How to detect this? Use http://developers.facebook.com/tools/lint/ tool to crawl your test page and catch incoming requests on your server side. I am sure facebook identifies itself somehow (has its own user agent perhaps).

serg