I'm trying to add a Facebook "Like Box" to an existing website, as described here
The Page I'm promoting works just fine in preview-box on that page.
But when I copy/paste the code as shown to my website, it instead shows a fraction of an empty facebook page wi开发者_开发问答th only a partially visible error message.
<iframe src="http://www.facebook.com/plugins/likebox.php?profile_id=SenRandyGordon&width=260&connections=10&stream=true&header=true"
scrolling="no"
frameborder="0"
allowTransparency="true"
style="border:none; overflow:hidden; width:260px; height:px"></iframe>
I cannot figure out what I'm doing wrong, and I added "Like Box"'s in the past, before Facebook released their new API.
Please help?
Solution
You have to replace all the "&" of the Facebook Likebox generator code with "&" - then it works.
Combine this method with Lemmy's method to make it work.
So the final result looks like these instead
<iframe src="http://www.facebook.com/plugins/likebox.php?profile=1&id=SenRandyGordon&width=260&connections=10&stream=true&header=true" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:260px; height:px"></iframe>
I copied and pasted the code supplied for the iframe, and it didn't work. I discovered there was no http: before the code. Once I put it there, everything worked perfectly.
I also faced same problem using facebook's social plugin. In this plugin if user enter wrong input then security question comes with random generated code with 2 words, but user can view only 1 word means it shows partial part..
Here is Onther solution .... It Really Works!!!
<script type='text/javascript' src='http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US'>
</script>
<script type='text/javascript'>FB.init('aaafdced248eed501f09f66e3c5b7de9');</script>
<fb:fan profile_id=\"118774364811981\" stream=\"0\" connections=\"10\" logobar=\"0\" width=\"244\" height=\"240\" css='serverside_facebook.css?1'>
</fb:fan>
I used above code in Java verticalPanel.getElement().setInnerHTML("above code");
It really works!
Change profile_id=SenRandyGordon
to profile=1&id=SenRandyGordon
It work for me
try thins iframe code working fine and tested by me on wordpress
<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FEnter_Your_FB_ID_OR_USERNAME&width&height=290&colorscheme=dark&show_faces=true&header=true&stream=false&show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:290px;" allowTransparency="true"></iframe>
John's answer might work. Haven't tried it. This worked for me:
change profile_id=
to just id=
in the embed code.
精彩评论