I have a facebook fanpage: www.facebook.com/derwettprofi
I wanted to create a like box. Although I use the code generated by facebook it does not work. I created the following simple html page:
<HTML>
<BODY>
<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fderwettprofi&width=292&height=62&colorscheme=light&show_faces=false&header=false&stream=false&show_border=false&appId=567203116676137" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>
</BODY>
</HTML>
But when called in the browser it looks like this:
I do not understand what is happening? The response is empty. Why does it not work?
You need to put the http:// in front of www. This happened to me as well
it is because your website is on localhost. Try uploading it to an online host, that should solve your problem.
Related
So, I've run my url through the facebook debugger and everything comes out right. if i post my url in a status, the correct thumbnail and description comes up. However, the like button on my site results in my web host url and thumbnail showing on facebook.
My url is adammoritzmusic.com
My iframe code:
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fadammoritzmusic.com&width=200&height=35&colorscheme=dark&layout=standard&action=like&show_faces=false&send=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:35px;" allowTransparency="true"></iframe>
help?
There's 3 Solutions You can follow:
#1
Use http://adammoritzmusic.com/Home.html (without https) because when you adammoritzmusic.com Facebook will use your index.html which redirects to Home.html
(Facebook Like button has a bug, the same domain has two different counts of likes one for http and the other for https)
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fadammoritzmusic.com/Home.html&width=200&height=35&colorscheme=dark&layout=standard&action=like&show_faces=false&send=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:35px;" allowTransparency="true"></iframe>
#2
Use Index.html instead of home.html or just use .htaccess file to make home.html as your default index file:
DirectoryIndex Home.html
#3
Create a Facebook fan page, this would the fastest and easiest solution.
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.
Hi I am trying to add a facebook like button to a website of mine but nothing seems to apear I've checked about a dozen tutorials and Im doing exactly what is being said there and the facebook button dosent apear.On firefox it shows nothing but on chrome , IE9 , opera and safari I get a this page can not apear error:
This is the link I'm using to generate the code:
http://www.facebook.com/pages/WillKode/228217780608588
And this is a test page i've created:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FWillKode%2F228217780608588&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
</body>
</html>
Are you testing just a local HTML file? It seems to work for me: http://jsfiddle.net/jhchen/D8pgg/.
Try to change the iframe src to https://www.facebook.com instead of //www.facebook.com. It should be the latter (the way you already have it) but when testing locally the latter will not work.
Reason is // mean use the protocol of the document which is great security-wise because the iframe will use https://www.facebook.com if you are on an https page and http://www.facebook.com when you are on an http page but if you are just testing locally the protocol is file:// and file://www.facebook.com does not lead anywhere.
hi there i am a student and practicing how to place the like box plugging code in simple html using the notepad,
here is the simple code i write with the like box plugging code:
<html>
<head>
<title>My Great Web page</title>
</head>
<body>
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Febitesblog&width=292&colorscheme=light&show_faces=true&border_color&stream=true&header=true&height=590" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:590px;" allowTransparency="true"></iframe>
</body>
</html>
and when i try to execute in browser it says:
This webpage is not found
No webpage was found for the web address:
file://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Febitesblog&width=292&colorscheme=light&show_faces=true&border_color&stream=true&header=true&height=590
Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found
hope guys it will fix my problem thank you :)
It's failing because the // in that is protocol relative meaning it loads the link/photo/like box/whatever using the same protocol used to access the page itself.
When accessing the page over HTTP (http://), the Like Box will be included over HTTP
When accessing the page over HTTPS (https://), the Like Box will be included over HTTPS
You're accessing a file on localhost, via the file protocol (file://) - which means it tries to include the Like box the same way, which is not valid since there isn't a file on your machine called 'www.facebook.com`
Use <iframe src="https://... now, and change it back to <ifame src=//... when you're uploading to your server
<iframe src="//www.facebook.com/plugins/likebox...
should be...
<iframe src="https://www.facebook.com/plugins/likebox...
The facebook 'like' button isn't working on my webpage when i upload it to the web. It works perfectly on my computer though. Any guesses as to why this is happening ?
http://savetheearth.99k.org/pledge.htm is the URL
i think the problem is in the url you have provided. As i check in your page source the i frame has following code :
<iframe src="http://www.facebook.com/plugins/like.php?href=earthsave.tk&layout=standard&show_faces=false&width=450&action=like&font=verdana&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
Where it should have been:
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsavetheearth.99k.org%2Fpledge.htm&layout=standard&show_faces=false&width=450&action=like&font=verdana&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
the problem was in your url:
src="http://www.facebook.com/plugins/like.php?href=earthsave.tk
The like button shows up for me just fine - I'm not even logged into facebook.
Two reasons we have found for this:
Simple Redirect:
If your site page has a redirect on it you will get an error.
www prefix redirect:
Facebook always tries to access your domain without the www prefix. If you have an auto redirect to send users from "example.com" to "www.example.com" - even if you pass the url to facebook as "www.example.com", the crawler tries to access the url without the www which results in an error.