FB.provide is not a function - facebook

I'm developing a WordPress plugin to show above or bottom the posts Facebook like and send buttons.
Unfortunately when is also activated a plugin for Facebook share button there is a Javascript error (FB.provide is not a function) and like and send buttons don't appear.
For example this happens in this page: http://www.pasqualepuzio.it/2011/04/plugin-facebook-like-and-send-button/
How can I solve this issue?
Thank you very much

I ´ve faced the same problem and it happens if you add the script twice on the site (http://connect.facebook.net/sv_SE/all.js)

I understood that part that we cant have all.js twice but I want to have Facebook Share Button and Facebook Like Button.
According to Docs, I need to include these two JS Files.
https://connect.facebook.net/en_US/all.js
http://static.ak.fbcdn.net/connect.php/js/FB.Share
Now, If I include both Firebug will give me same error "FB.provide is not a function". If I remove either of them then Like or Share button wont work.
I can do iFrame version but I have HTML Encoding issues with iFrame Version. I am programmatic generating HTML Response.
Any idea, how to approach?

There is a workaround for this: instead of placing the javascript Fb.Share within the same page where you are loading the Javascript SDK, use an Iframe with the first and set it in the second.

Related

Facebook like button redirection?

I tried to install Facebook Like Button (http://developers.facebook.com/docs/reference/plugins/like/) on my page but after I've put the code (HTML5 version) there is some strange redirect which change address of the page adding "_FB_f2af6423b6fd064xd_action=proxy_ready&data" to it?
Do you have any idea what may cause the problem?
I can install iframe version of like box but some time ago I received an information about similar problem while there was some toolbar installed in the web browser. String in url was different but result the same - error 404.
You can see the problem here: www.keeeper.voyagersblog.com/en/ and properly working page (without like button) here: www.bea.trvblog.com/en/ .
Thank you for help!
Best regards,
Bartek
The problem was that I have my own js EventListener called 'message' and it seems that facebook use the same name.
My event listener is fired by fb script and then my function makes redirect (params are not proper so it goes nowewhere).
When I changed listener name it's ok, it seems that it's fb bug.
Thank you anyway!

Facebook Send button does not show up on Gwt popup panel?

I'm trying to get Facebook send or like button display on GWT popup panel and I am not successful. When inspecting the generated HTML, facebook HTML button looks properly inserted into but it just does not show up. Save Facebook button works well in html page (not on GWT panel).
Have you ever had success in displaying Facebook Send or Like or Share button in GWT? I know I ca implement FB Like button myself using API or other libraries. But I do it need that. I need standard Facebook Send button to be used in my GWT application.
Please advise me if you have experience and were successful.
Thank you very much!
I had a similar problem, and it was because, in the html file's script tag, I had changed and not updated the src="path" to a valid path. I had a wrong directory listed in the path. For me, it's correct now with:
<script type="text/javascript" src="clienttest/clienttest.nocache.js"></script>
I rebuilt, and the image appeared on the page. This problem was keeping the entry point module from loading.

"Like Button" does not appear when I paste plug-in code into HTML snippet on iweb?

Please help. I've spent hours on this. With Twitter I had no trouble adding a button to my website using iWeb but with facebook.....
The best way I can describe my problem is this: I go through all of the required steps to obtain the plug-in for my facebook page (http://www.facebook.com/thekitchensinkwma). I then "get code", copy the code, drag HTML Snippet onto my desired page in iWeb, then paste the code into the appropriate window (BTW: I've tried all 3 codes several times). When Click the "Apply" button, the "Like" button does not appear.
I'm at my whit's end! Please help. Thanks.
Martin
Without seeing the page I have two initial thoughts you can run down:
Your CMS [iWeb or whatever you are using] is altering the fb-root tag which is required for the button to show. Twitter only uses javascript.
Your page is appearing via iframe, javascript or something from the system is causing Facebook to believe you may be hiding the button to fake a click.
If this is happening with both the iFrame and Scripted method a url will be helpful as it may be more complex.
Try adding <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> to the HTML-tag.
Would be easier if you provided a link though.

Facebook like button stopped working on my wordpress site

Since 2 weeks ago it worked, and still works for old urls. but now for every new post the like button remain at zero, and if i press the button it blinks 1 but go back to zero immediately.
My site: http://arielmartini.com/
An old url that (still) works: http://arielmartini.com/2011-06-30-bixiga70
A new url that no longer works: http://arielmartini.com/2011-07-02-romulo
Even if I put the url here it doesn't work (try with the 2 url above - "URL to Like" field).
It appears that you're using both the old Facebook "Share" and the newer Facebook "Like" buttons. However Facebook Share (via static.ak.fbcdn.net/connect.php/js/ is the old SDK and is being deprecated).
You'll just want to use the new SDK (which you are correctly including) at http://connect.facebook.net/en_US/all.js.
I believe removing the conflicting "share" button will solve your problem.
Looking at the url you posted, there is a javascript console error (see image) which is causing the javascript code from continuing execution.
To fix it, remove this line of code from your wordpress site, or disable the plugin that is adding this line:
<script type='text/javascript' src='http://arielmartini.com/wp-content/plugins/fbconnect/fbconnect.js?pluginver=99&ver=3.1.4'></script>
You can't load both the deprecated fbconnect.js file as well as the new Facebook javascript sdk .js file that you load on line 435. If anything is relying on the old deprecated library, I would suggest upgrade as soon as possible because Facebook is killing deprecated functionality all the time.
The problem was that i didn't had open graph tags on my page. Using this plugin fixed it. You can also analyse the page using this link.

Facebook Like button throwing Javascript errors

Recently I've been having troubles with displaying the like button on my homepage, no code was changed so I believe Facebook may be the culprit but I'm not 100% sure. Originally it was throwing "bootloader is undefined" errors in two places:
<script type="text/javascript">Bootloader.setResourceMap({"KhOUG":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yo\/r\/wFcdvtg8yWA.js"},"uBXoU":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yg\/r\/vnWtCAcBiXn.js"}});
And:
Bootloader.configurePage([]);
Both occur after the page querys the http:///www.facebook.com/plugins/like.php page.
But now it's throwing "bagofholding is undefined" error on:
function muffinize(d){var c='a';var b='d';var a=[c,b].join('');return d.replace(/muffin/g,a);}window.Util=window.Util||{warn:bagofholding,error:bagofholding,info:bagofholding,log:bagofholding,stack:bagofholding};if(typeof console=='undefined')console={log:bagofholding};
The Facebook Like button is implemented using the AddThis service but I checked all the lines of code and they seem fine. It doesn't seem like other sites are having this issue as well. All the errors are on Facebook's side.
It doesn't work here: http://importbible.com/2011/05/02/papercraft-skills-2012-audi-a7/
But works here: http://importbible.com/shop/shirts/group-buy/seventh-heaven-shirt/
The only thing I could think of that may cause issues is the HTML5 Boilerplate .htaccess file.
in my case my error was coming from having "share" buttons. The script for share buttons also defines "FB"... so the new "like" script and the old "share" script conflict. Once I removed the old script everything was fine. (However, "share", is better for my particular site...)
I seem to see the 'Bootloader is undefined' error when I set the href attribute of the fb like button to a non-existent page (a page that can't be accessed by the fb script file - such as the url on my dev machine / localhost).
After hunting around I found the answer, some of the meta data on my website was preventing the Like page to scrape my page. Using the Lint tool I was able to fix the errors on my page:
https://developers.facebook.com/tools/lint/