tags:

views:

1660

answers:

2

Hi all,

I am trying to use FBJS in my iframe app. Nothing that I write seems to work. Any ideas?

A: 

I thought the whole point of an iframe Facebook app was so you could use your own JS instead of Facebook's subset? The iframe is sandboxed from the user's Facebook, so it's safe for Facebook - you can't access FB's internals. FBJS was invented so you could use JS in profile boxes and canvas apps without being able to screw with the rest of the Facebook functionality.

ceejayoz
what is your definition of FB's internals?
vondip
Facebook doesn't want you mucking around with anything on the site outside your app. Allowing normal JavaScript in a canvas app would mean you could change things in Facebook's layout - you could make the "Home" link go somewhere else, for example.iframe apps can't touch anything outside the iframe, so it's safe for Facebook to allow full JavaScript there instead of the limited subset that is FBJS.
ceejayoz
A: 

You will need to use Facebook connect to access FBJS calls.

Facebook encourages Iframe developers to use Facebook Connect to perform client-side facebook interaction, such as publishing feed stories, permission dialogs, etc.

See: http://wiki.developers.facebook.com/index.php/Creating%5Fa%5FPopup%5FDialog%5Fin%5Fan%5FIFrame

webguydan

related questions