Question

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?

Was it helpful?

Solution

I've sorted this out,
I had to take my servers log and search for the Facebook crawler ( yes, there is one ). I've added the exception into my 'age page' and everything works flawlessly. Same issue applies to Twitter :)

OTHER TIPS

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top