I currently have a “standard” FB LIKE button integrated on my site.
My problem consist of the following:
-
NOT WORKING: When visiting a page the first time and upon clicking
the FB LIKE button, the image and description isnt taken from the
meta tags. Example can be seen here -
WORKING: When refreshing the page and then clicking the LIKE button,
then the meta image + description is showing correctly. (so need to visit the page one time and then refresh) Example can be seen here
Im naturally looking for the image and description to show the first time I click LIKE.
Javascript SDK inserted right after tag:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Inserted FB LIKE button:
<div class="fb-like" data-href="<?php the_permalink(); ?>" data-send="true" data-width="450" data-show-faces="true" data-font="tahoma"></div>
Inserted meta tags:
<meta name="description" content="En hjemmelavet bænk som denne, med plads til opbevaring under låget, er både praktisk og hyggelig i en lille Københavner lejlighed. Lichtenstein stof fra e"/>
<meta property='og:locale' content='da_DK'/>
<meta property='og:type' content='article'/>
<meta property='og:title' content='"Neonliving+Lichtenstein" - Miniaturemaison'/>
<meta property='og:url' content='http://domain.com/beta/neonliving-lichtenstein/'/>
<meta property='og:site_name' content='Site name'/>
<meta property='fb:admins' content='665414800'/>
<meta property='og:image' content='http://domain./beta/wp-content/uploads/2013/05/beanken.jpg'/>
Any ideas?