Can't see like plugin iframe on (at least) some browsers - facebook

Not sure why. I grabbed the code from:
http://developers.facebook.com/docs/reference/plugins/like/
And as stated there, we can read:
"href - the URL to like. The XFBML version defaults to the current
page. Note: After July 2013 migration, href should be an absolute URL"
So I did.
<body>
<div>
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fprojectokairos&width=100&height=21&colorscheme=light&layout=button_count&action=like&show_faces=false&send=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
</div>
</body>
Could this be related with the fact that the page is unpublished?
I hope not because I do need to place the button here and there on several pages before the FB page goes live.

Being unpublished is possible, but I would also check your plugins. Firefox and Chrome especially. Do you have AdBlockPlus, DoNotTrackMe, or NoScript installed? The last two, I know interfere with the Facebook like button.

Related

Facebook share not working

Have this problem, I have a WordPress website and on the single.php file when articles are we have a scrolling social bar, with Facebook like, Tweeter and Google+
However I wanted to change the Facebook like into a Facebook share button.
Anyone have the answer to this, I've been searching for ages to find a solution.
The Facebook like code I have is:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px;">
</iframe>
I have tried using: <div class="fb-share-button" data-href="<?php the_permalink() ?>" data-type="box_count"></div>.
This doesn't display all the time in Firefox and is virtually non-existent in Chrome, Safari and IE.
I use Facebook comments, so when share button doesn't appear, nor does the comments section.
I'm at my witts end with it.
Many thanks in advance
Try removing data-href="perma-link stuff" that Facebook automatically puts in for you.

Facebook-like-box Safari issue: appears in some browsers, disappears in others

I have put a facebook like box on a website i've created, and on my computer it all works fine (safari, chrome, firefox, ie, ...)
But when some of my friends open the website in safari, de box won't show to everybody.
(so some friends can see it in safari, with others it just won't show/appears and disappears immediatly/...)
Here's the iframe-code i've included
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FLuca-Barassii%2F126244157780&width=300&height=340&colorscheme=dark&show_faces=true&border_color&stream=false&header=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:340px;" allowTransparency="true"></iframe>
hope anyone can help me... :)
This is most likely due to their version of Safari. This browser's webkit had problems interpreting ampersands in urls in a previous version, encoding the & to & instead of & in xhtml pages. This was fixed in a later Webkit.
But to make sure, you can encode your iframe url yourself:
<iframe src="//www.facebook.com/plugins/likebox.php?
href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FLuca-Barassii%2F126244157780
&width=300&height=340&colorscheme=dark&show_faces=true
&border_color=&stream=false&header=false"
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:300px; height:340px;"
allowTransparency="true">
</iframe>
This would not have stopped the box from not showing in specific (older) versions of Safari though, because the ampersands would still have been encoded incorrectly.

Sharing the same page on facebook with different titles/photos

I have many photos on the page and I'd like to add like buttons to them, so I created a page photo.php?id=x and link like buttons to it with different variabiles. But fb removes all variabiles after posting! About 1 year ago it was working, but now I can`t add variabiles in link to share.
There is another way to share the page with different ID?
echo '<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fportovenere.a-turist.com%2F'.$curfolder.'photo.php%3Fid%3D'.$row["id"].'&send=false&layout=button_count&width=450&show_faces=true&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>';
P.S.:
$curfolder="ru/"
id = 1-5 for test
or
echo '<div class="fb-like" data-href="http://www.portovenere.a-turist.com/'.$curfolder.'photo.php?id='.$row["id"].'" data-send="false" data-layout="button_count" data-width="150" data-show-faces="true"></div>';
with this one: it share a page with variabiles but doesn`t pick up info (photo, title)
or old sharer:
echo '<a target="_blank" rel="nofollow" href="http://www.facebook.com/sharer/sharer.php?u=http://portovenere.a-turist.com/'.$curfolder.'photo.php?id='.$row["id"].'"><img style="margin-bottom:25px;" src="/images/fb_share_img.png"></a>';
I think that your problem is with the og:url meta tag.
Check out what the debug tool says about your url:
Fetched URL: http://portovenere.a-turist.com/photo_galery.php?id=4
Canonical URL: http://www.portovenere.a-turist.com/photo_galery.php
I believe that if you fix that and return the same url for the og:url it will behave as you want it.

Facebook like count on details and home page

I have a website that displays houses to the visitors. When the user wants to view a house, he/she clicks to view the house and a details page will show. With the url being www.myhouses/details/123 (123 being the unique id for the house).
I added a Facebook like button to the details screen (www.myhouses/details/123) . Will this "like" be counting towards like for www.myhouses (the entire website) or only for the specific url.
Is there a way to get the count for all Facebook likes to my page, in the above mentioned scenario ?
thanks
That depends if you have defined the data-href attribute in the fb-like div.
To know all likes you have on your website. From what I know ( correct me if is wrong ). You need to map all your site urls and request using the Facebook Graph or using FQL to get the like of every single page, and so, sum then all.
It depends. When you create a like button you pass the URL you are going to LIKE.
The documentation shows:
<iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
If you put:
<iframe src="https://www.facebook.com/plugins/like.php?href=www.myhouses.com"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
you are going to like your site, if:
<iframe src="https://www.facebook.com/plugins/like.php?href=www.myhouses.com/details/123"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
you are going to like your house link.
Well, if you haven't defined it with the data-href attribute, it will use the current URL, otherwise it will use the defined url.
<div class="fb-like" data-href="http://www.yourdomain.com" data-send="false" data-width="450" data-show-faces="false"></div>

Facebook like button stopped working

I started having problems a couple of days ago with the Like button on my Facebook application page. It has been working for almost 6 months but stopped working yesterday. When I am logged into my own Facebook account I see the 'Like' count, but if I am logged out or logged in as anyone who hasn't already 'Liked' my app, it doesn't work. They see the button as if nobody has 'liked' it yet and when they click it, it seems to reset every time.
The URL I am trying to like is an APP URL. My code is pasted below.
<iframe src="http://www.facebook.com/plugins/like.php?app_id={myAppId}&href={myAppURL}&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=dark&font&height=21"
scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:450px; height:21px;"
allowTransparency="true">
</iframe>
I've tried a few variants of this code, but I can't seem to get it to work. Even when I go to the page that generates 'Like' button code on Facebook and give it my URL, I see the same problem. When I click the button I get the text "Error" in red to the right of the button. I've seen an article on Mashable that this same problem happened about a year ago for some people...
Try replacing the http:// part of the src attribute with //
So it should look like this:
<iframe src="//www.facebook.com/plugins/like.php?app_id={myAppId}&href={myAppURL}&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=dark&font&height=21"
scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:450px; height:21px;"
allowTransparency="true">
</iframe>