fbjs

FB.getLoginStatus not calling its callback

情到浓时终转凉″ 提交于 2019-12-03 23:44:44
The title really says it all. Under some (undetermined) conditions FB.getLoginStatus() just stops working and won't invoke the callback I gave it. The only interesting clues I've found are FB.Auth._loadState is stuck on "loading" -- whatever is supposed to make it click over to "loaded" isn't happening slight delays like putting in alert() calls tend to make it start working Any hints at all about even how to investigate this welcome. This usually happens for me when I am running the page under a different domain from what has been registered in Facebook. Typically this is when I am developing

facebook canvas height no scroll set in ie8 and firefox

柔情痞子 提交于 2019-12-02 19:14:48
问题 hey, i want to set a long page app without fb will limit the height of my app and append scroll i did iframes& canvas and autoresize in settings and apply that code and its limits me in ie its shows scroll and in firefox its cuts the content: the code is here: http://pastebin.com/bmweWuTS please help 回答1: I am actually having the same issue, it started yesterday, but i have not changed the code. Facebook having some issues maybe? I was using setAutoResize, but started getting the scrollbars,

FB.ui feed not giving a callback

走远了吗. 提交于 2019-12-01 19:47:12
I am unable to get any feedback from my Facebook FB.UI() method. I am convinced that I am using it correctly, as the actual post does post to my wall, but the callback data is either missing or empty. I am using: FB.ui({ method: 'feed', name: 'asd', link: 'asd', picture: '', description: 'asd' }, function(response) { console.log(response); if(response.post_id) { $.post("ajax/wall.php",{wall : 1}); } else { } } ); I am not sure how this resolved itself, but it did :) I cleared my cache and changed my code to below and it worked (however I don't believe the change of code actually played any

how to check special permissions in facebook

不想你离开。 提交于 2019-12-01 03:10:02
how can i check in javascript if user has granted my site the publish stream permission ? I had this same problem but couldn't find any sample code. Anyways, I came up with this, which works for me. Hope this helps someone. FB.api('/me/permissions', function (response) { var perms = response.data[0]; if (perms.publish_stream) { // User has permission } else { // User DOESN'T have permission } } ); Portman The API method you're looking for is Users.hasAppPermission . You could call it directly from JavaScript, but it will probably be more efficient to write your own HTTP method, that calls it

Javascript: My fbAsyncInit() method never gets called

醉酒当歌 提交于 2019-11-28 03:12:49
问题 I'm copying the code right out of this page on Facebook's developer website and the fbAsyncInit() method never fires. I've also read this page, I've tweaked the code quite a few different ways, and I cannot get the method to fire. Your thoughts? Also, for what it's worth, when I try and run this code and Chrome (on Mac) and run Firebug lite, I get an error that says "Firebug Lite cannot be loaded in this page" Here's the code... <html> <head> </head> <body> <div id="fb-root"></div> <script

How to delete an HTML element inside a div with attribute contentEditable?

萝らか妹 提交于 2019-11-27 18:54:13
have this html: <div id="editable" contentEditable="true" > <span contentEditable="false" >Text to delete</span> </div> need that the span (and all text inside) is removed with a single backspace, is it possible? This turned out to be more complicated than I thought. Or I've made it more complicated than it needs to be. Anyway, this should work in all the big browsers: function getLastTextNodeIn(node) { while (node) { if (node.nodeType == 3) { return node; } else { node = node.lastChild; } } } function isRangeAfterNode(range, node) { var nodeRange, lastTextNode; if (range.compareBoundaryPoints

How to delete an HTML element inside a div with attribute contentEditable?

允我心安 提交于 2019-11-26 19:38:58
问题 have this html: <div id="editable" contentEditable="true" > <span contentEditable="false" >Text to delete</span> </div> need that the span (and all text inside) is removed with a single backspace, is it possible? 回答1: This turned out to be more complicated than I thought. Or I've made it more complicated than it needs to be. Anyway, this should work in all the big browsers: function getLastTextNodeIn(node) { while (node) { if (node.nodeType == 3) { return node; } else { node = node.lastChild;