fbjs

facebook ignore javascript events

hi, I have a fbml app with a contact form and inputs like this one: <input type="text" tabindex="1" value="Name" name="name" id="name" onfocus="if(this.value=='Name')this.value='';" onblur="if(this.value=='')this.value='Name';" /><br /> Does anybody know why facebook ignore this javascript: onfocus="if(this.value=='Name')this.value=...

facebook canvas pages, fbml and javascript

I have a game that i have built for facebook in flash, but I have built a wrapper for it in html. I would like a JavaScript league table that once the user completed the game their score is sent to the db The thing I would like- as soon as the game finishes the leage table is updated through javascript calls.. is this possible on fb ca...

Render FBML in Facebook Dialog Popup

I'm working on a facebook page where there is a table of profile images. Onclick for each of these images, I'm using a facebook dialog to show the name, a picture and a description in a popup. The name is stored in the <img> name attribute. The description is stored in the <img> title attribute. The img src is stored in the <img> src at...

Add iframe to facebook fan page without onClick method

Is there a way to add an iframe to a facebook page without having to do the onClick functionality? Right now I am using this code and it works fine except you have to click the link to make it show the iframe? <!-- Start iframe CODE --> Like me to show the iFrame link! <fb:visible-to-connection> <a onClick=...

FBML: simple way to display a list of people in a popup?

When you go on your profile page and click on "See all" in the "Friends" sidebar, you come up with a simple popup showing a (paginated) list of your friends (with their profile picture and name) and a search button. I've got a list of users' ids and I'd like to display them in the same exact way: with a popup, the list and the fancy sea...

FBJS image slider

Im trying to recreate a slider similar to: http://www.facebook.com/BacardiLimon?v=app_146177448730789 but apparently there is zero documentation on how to do something like this with FBJS :'( var eCardPos = 0; var totalCards = 4; var animationFadeTime = 300; var cardUrls = []; cardUrls[0]= ''; cardUrls[1]= ...

FBJS...OnClick not being passed. DHTML/setInnerXHtml problem

Hi, thanks so much in advance...here is the problem... I am trying to add dynamic HTML element (EX. [delete]),everytime on a event call using FBJS.I am able to append the element using following code. var oldFriendHtml = document.getElementById('friend_container'); var numi = document.getElementById('theValue'); var num = (document.g...

Javascript setting variable value

Hi Guys! I want to set the value of stat from if else block but when I set it and alert it then it says to me "undefined". How can I set the value of stat. Here is my code. deleteComment = function(postId){ var stat = "Don't Know"; FB.api(postId, 'delete', function(response) { if (!response || response.error) { stat = "Er...

Facebook FB.ui stream.publish error

Working on a project that has a website and a Facebook page. They both reference the same SWF file and JS code that the SWF file uses to interact with the website/Facebook. The custom Javascript action, which invokes the FB.ui() method for sharing, works so much in that the dialog/popup appears, however Facebook results with an error ("...

flash, facebook and fb:swf are giving me problems

i have this flash file running on fb http://www.facebook.com/pages/testingthisout/131732006857831?v=app_4949752878 but it does not load completely- there should be a hand and color chooser what am i doing wrong? this is the fully working one www.candynails.co.uk/nailapplication/ code i am using <fb:swf swfbgcolor="000000" allows...

Facebook App in Profile Tab: problems getting the user session

I'm working in a mini-app, which will have 3 pages, and i want all the interaction to happen inside a profile-tab.So, using javascript, i want to show/hide a few divs, which i'll populate using the FBJS ajax object. My problem is, i'm not getting the user session in the ajax calls.As documentation is extremely confusing, i've ended up n...

How to do any type of info sharing from within facebook tab?

Firstly apologies for the length of this question, and for asking about facebook API ( seemingly one of the most inconsistent api's in the world... ). The Situation: We're producing an FB product 'community' - type page for our client, featuring standard facebook tabs, one of which embeds a flash game. At the end of this game we'd like ...

Adding a Facebook comments box to my site. It works,but is my technique correct?

I wanted to add a simple comments box to my page, so I did this: Created new application Filled out ONLY 'Site URL' and 'Site Domain' (I overlooked canvas or any other options) Got my appID In my HTML file added the FB namespace included the FB JavaScript file executed fb.init() with my appID and I'm able to use fb:comments on my...

Tagging friends in a fb.api status update?

i was wondering whether it's possible to tag friends somehow using the facebook fb.api (javascript sdk) call... By tagging I mean what happens when you use "@" in the regular facebook.com ui ...

FB.ui does not work the first time. Help!

I created an app which publishes to the user's wall. The problem is, the first time the user accesses the page, the FB.ui doesn't show up. After one reload, it works perfectly. by first time, I mean when the user gives permissions to the app, OR when he has already given permissions. In both scenarios, the problem occurs. Any ideas, pe...

Facebook post link to wall - image is missing when it's fetched with script

Hi! :) I'm using following code using FB Javascript API to post link to wall: FB.ui({ method: 'stream.publish', message: 'message text', target_id: null, // friend id to post to; if null, posts to own wall attachment: { name: 'applcation name', href: 'http://whatever.com', description: 'descripti...

From validation problem on Facebook tab

I am using static FBML but I am having trouble debugging a form validation problem. I get the dialogue which to me seems like it should return false, but the form submits anyway. I am using Firebug and I see a brief message in Red that I have no chance to read. I appreciate the help :-) var txt ='Enter Zipcode'; //... function setErr...

Does Cufon work in FBML static pages?

Just as the title says, does Cufon work in FBML static pages? If not, what works to replace the fonts? ...

How to remove all child nodes from parent using FBJS

So, I need to remove all the child divs from a parent div using FBJS. I basically want to end up with an empty container div. Here is the code that I am using right now. var events_next = document.getElementById('events-next'); for(var i=0; i < events_next.getChildNodes().length; i++) { events_next.removeChild(events_next.getFirstChil...

FBJS setStyle( {backgroundImage}) not working?

Hi, i am trying to add some images to my facebook tab-app via FBJS. The Problem: I can't see the images and I don't know why. The FBJS code url = "http://www.domain.de/image.gif"; myImg = document.createElement('img'); myImg.setStyle( {backgroundImage: 'url('+url+')' }); document.getElementById('wrapper').appendChild(myImg); The r...