Cannot get a like Button - facebook

i just try to get a like & share button on my website with the code from the generator:
<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/de_DE/all.js#xfbml=1&appId=278654312150503";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
......
......
<div class="fb-like" data-href="http://wwww.friendsmap.info" data-send="true" data-layout="box_count" data-width="70" data-show-faces="true"></div>
Firebug said to me "Invalid ApplicationID"
But the appID is the same like my facebook developer shows it
What can be wrong ?

Looks good to me, possible problem could be that you activated the sandbox mode in the developer settings. But you do have an error in the URL: http://wwww.friendsmap.info > 4 w´s
Also check the Website URL in the developer settings, maybe you got it wrong there too.

Related

Facebook Share Button - 'Attachment Could Not be Found'

I have implemented the Facebook share button as follows:
<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_GB/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://www.facebook.com/bookf1" data-layout="button_count" data-share="false" data-width="180" data-show-faces="false" data-font="tahoma"></div>
<div class="fb-share-button" data-type="button"></div>
It appears on my website as expected and clicking it brings up the sharer.php with the expected display. However, when I click the 'Share Link' button it shows the 'thinking' animation for a second then nothing happens. The sharer.php pop-up just remains on-screen.
If I try and share the link via a private message I get an error saying "The Attachment Could Not Be Found".
This is running on a publicly accessible URL.
Any suggestions would be greatly appreciated as I can't seem to find this issue anywhere else.
Thanks!
I ran into a similair issue with exactly the same symptoms and wasted some time here.
After clicking my share-button the expected popup opened. In the url it was visible that sharer.php was called with an unknown (to me at least) app-id as parameter. After creating a facebook app for the website in question and putting the newly created app-id as parameter ..
<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/de_DE/sdk.js#xfbml=1&appId=MY_APP_ID&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
.. it worked.
For debugguing purposes it could be helpful to put another source for js.src:
[...]
js.src = "//connect.facebook.net/de_DE/sdk/debug.js[...]
[...]
This will log debugging messages to the js-console. (As can be read up here: https://developers.facebook.com/docs/javascript/quickstart/v2.0#advancedsetup)

Facebook Like Box displays only if logged in

as the title says, I found out my like box not appearing unless I am logged in facebook
Back in the past it was not like this
On some websites, I see the like box showing up even if I am not logged; I checked the code, and what differs from mine is that they have an AppID
Could someone please explain this to me?
if you are using an AppID your Check your application not running in sandbox or development mode
here is a sample of your like button code
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<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_GB/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

How to make a facebook like plugin on your html website?

I am trying to make a plugin in my website just like this one :
I am using this code. It includes the script :
<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_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
and this :
<div class="fb-like" data-href="htpp://www.my-site.com/" data-width="600" data-height="30" data-colorscheme="light" data-layout="standard" data-action="like" data-show-faces="true" data-send="true"></div>
but nothing shows up. Do I have to use css or a js link included in my page to make it work?
I think you are missing the appId. Make sure to create a Facebook application and connect it with your plugin.

Facebook Like-Box only displays in Safari

I currently have a Like-Box that is only visible while I'm in Safari on my MacBook.
The following are unable to view the like-box (that I have tested so far):
Chrome,Safari (mobile) (iPhone4,4S,5,iPad), Firefox
Is functionality restricted to a certain Java setup? I pulled the code directly from Facebook and have included the Java as they recommend.
Thanks in advance!
Code in question:
Facebook-supplied block:
<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&appId=MYAPPID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
LikeBox:
<div class="fb-like" data-href="https://www.facebook.com/pages/MyPage/MyID" data- send="false" data-width="60" data-show-faces="true"></div>
</div>
Please Note that I have deidentified my Page and ID, thanks.

Facebook Like-box doesn't work with specific sites

I see a weird kind of fail working with like box... I can't see the like box, but the address looks fine:
<div class="fb-like-box" data-href="http://www.facebook.com/instituto.vannghiespana"
data-width="292" data-height="570" data-show-faces="true"
data-stream="true" data-header="true"></div>
I have tried changing the “http” for “https” and still doesn’t answer. Even when I try to generate the code on like box facebook developers site, the validation says the code is ok, but I still can’t see the site.
But... When I use the older website:
data-href="https://www.facebook.com/pages/Instituto-Van-Nghi-Espa%C3%B1a/133758943312622"
Works fine.
Thanks for your time.
(EDITED)
I already include the facebook sniplet after body
<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/es_ES/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
even I try changing js.src = "//connect for js.src = "http//connect
Any ideas?
Nacho
The Facebook Like Box plugin is for liking Facebook Pages.
The example you listed, instituto.vannghiespana, is a (fake) profile, not a page.
The like box plugin cannot be used with profiles. If this is your profile you should convert it to a Page (for one thing, a profile can't have more than 5000 friends)
You're forgetting the JavaScript code:
<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&appId={{APP_ID}}";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Look more carefully in the documentation.
do you have the required fb-root html tag:
<div id="fb-root"></div>
as well as the corresponding javascript code?