Facebook Like button is not refreshing dynamically - facebook

I've implemented the Facebook Like button on a WordPress blog and it is posting recommended links to Facebook.
However, it's not refreshing dynamically. I must refresh the browser and reload the site to see the updated Like count. Otherwise, when I press the button, it just grays out.
Here's the code:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=450&action=recommend&font=verdana&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
And the site:
http://bit.ly/eYGXbo
I'd appreciate any suggestions!

Try changing
<?php echo urlencode(get_permalink($post->ID)); ?>
to just
<?php echo $permalink; ?>

Related

Empty iFrame for Facebook content embedded on page

I have the following code:
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F%3Fref%3Dlogo%23%21%2Fpages%2FCadenamovitel%2F144895632232758%3Fref%3Dsgm&width=230&connections=10&stream=false&header=true&height=587" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:230px; height:587px;" allowTransparency="true"></iframe>
And when I try to navigate to the url that loads the iframe it works well. But when I put this iframe inside my webpage, the content is not loaded, I just get an empty iframe. The wierd thing is that if I change the page referenced by the like box, it shows correctly in my webpage. For example:
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F%3Fref%3Dlogo%23%21%2Fpages%2FMovistar%2F115204311836948%3Fref%3Dsgm&width=230&connections=10&stream=false&header=true&height=587" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:230px; height:587px;" allowTransparency="true"></iframe>
So I think it's a permissions related issue, but I couldn't find the option to allow it.
I found it! It was a demographic and an age rectriction in my page, and it seems that dissables the social plugins unless a facebook session is opened and match that criteria. Removing both restrictions allows the plugin to show correctly!

Facebook Like Box only works in one browser

I have been trying to get a like box on a website that works for more than one browser (chrome) and I can't seem to make it work. I've tried FireFox, Safari, IE and nothing. I could get the default Like Box example to work no problem, but when I use the following code nothing:
<iframe src="https://www.facebook.com/plugins/likebox.php?id=114521595255240&width=292&height=300&show_faces=false&colorscheme=light&stream=true&border_color&header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:300px;" allowTransparency="true"></iframe>
I also tried:
<iframe src="https://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Forlaborersapprenticeship&width=292&height=427&show_faces=false&colorscheme=light&stream=true&border_color&header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:427px;" allowTransparency="true"></iframe>
I tried with http: and https:. I tried with & inplace of &any help would be greatly appreciated.
Thanks
Mike
Try doing this
<div class="fb-like-box"
data-href="https://www.facebook.com/yourfacebookpage"
data-width="462"
data-height="400"
data-show-faces="false"
data-colorscheme="dark"
data-stream="true"
data-border-color="#333333"
data-header="false">
</div>
Make sure the page is live and has content. If there are no active posts, browsers won't have any content to pull and so won't show the like box. Also, try coding the & to the full html code of &, that helped me.

Getting the FB like to grab right URL

I am using an Facebook like button within an iFrame in my Fancybox, for my site I use Zenphoto. This seems to only way to make the like button show up in Fancybox.
The code:
this.title += '<iframe src="//www.facebook.com/plugins/like.php? href=http://www.dagloos.com' + this.href + '&layout=button_count&show_faces=false&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:20px;" allowTransparency="true"></iframe>';
When someone clicks the like button now, a blank like notification shows on the facebook page, with the direct img url. I added the og tags to the header of my website, but it doesn't grab them when liking. Probably because the iFrame version is outdated.
How could I make it that the like shows up on facebook with the image thumbnail and if even possible, the rest of the information (site title, desc. etc.)?
<iframe src="http://www.facebook.com/widgets/like.php?href=type in ur web address here"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
After href type in your web address here

Like button doesn't actually 'like' the page

I have tried all three different options facebook lets you use when embedding a facebook like button but when I like a page it appears to have added the +1 but when I refresh the page the 'like' doesn't stay. It also doesn't appear in my timeline.
<div class="sm-facebook">
<iframe scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:100px; height:21px;" src="//www.facebook.com/plugins/like.php?href=http://mysite.com/blog/blog-post&send=false&layout=button_count&width=100&show_faces=false&action=like&colorscheme=light&font&height=21&appId=277475035619415"></iframe>
</div>
http://mysite.com/blog/blog-post is an invalid URL. I get nothing. Try it for yourself at https://developers.facebook.com/tools/debug. It has 1 critical, 1 error and multiple warnings. Fix those up and it should work fine.

likebox event (iframe)

im using likebox in iframe
<iframe src="//www.facebook.com/plugins/likebox.php?href=
<?=Facebook::GetConfig('LikeUrl')?>
&width=292&height=290&colorscheme=light&
show_faces=true&border_color&stream=false&
header=true&
appId=<?=Facebook::GetConfig('appId')?>"
scrolling="no" frameborder="0" style="border:none; overflow:hidden;
width:292px; height:290px;" allowTransparency="true" id="fbframe"></iframe>
how can I know have user pressed like button or no , cuz
FB.Event.subscribe('edge.create', function(targetUrl) {
alert('liked ');
});
does not works
edge.create and edge.remove events fired only for non Iframe version of Like Button (XFBML and HTML5)
You can easily change your Iframe version other:
<fb:like-box href="<?=Facebook::GetConfig('LikeUrl')?>" width="292" height="290"
show_faces="true" stream="false" header="true"></fb:like-box>