Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are a couple of types/purposes when creating a Facebook App, and I believe your question is about <a href="http://developers.facebook.com/docs/guides/canvas" rel="noreferrer">Apps on Facebook.com</a>. </p> <p><strong>UPDATE:</strong> On <a href="https://developers.facebook.com/blog/post/462#fbml_roadmap" rel="noreferrer">March, 11, 2011</a> Facebook stopped allowing new FBML apps to be created. So back to your questions: </p> <blockquote> <p>Can I use jQuery with Facebook apps?</p> </blockquote> <p><strong>YES</strong>, you can use any JS library in your Apps (Canvas, tab or website) since the iframe is the <strong><em>only</em></strong> canvas type now.</p> <hr> <p>Now facebook <em>still</em> gives you the choice between developing your Facebook application canvas either in IFrame or FBML <strong>BUT</strong> they are encouraging developers to use IFrame as they are in the process of deprecating the <a href="http://developers.facebook.com/docs/reference/fbml/" rel="noreferrer"><code>FBML</code></a>: </p> <blockquote> <p><strong>We are in the process of deprecating FBML</strong>. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML. While there is still functionality that we have not ported over yet, we are no longer adding new features to FBML.</p> </blockquote> <p>Also as you can notice on their <a href="https://github.com/facebook/connect-js" rel="noreferrer">Javascript-SDK</a>, that one of the example is actually using the jQuery library! </p> <p>SO, <em>can I use jQuery with Facebook Apps?</em><br> <strong>YES</strong>, .... and <strong>NO</strong>!<br> <strong>YES</strong>: you can use it inside your <strong>Canvas Page</strong> if you choose IFrame AND<br> <strike><strong>NO</strong>: you can't use it inside your Page Tabs, yet: </p> <blockquote> <p>Broadly, a Page Tab is loaded in exactly the same way as a Canvas Page, with one <strong>(large) exception</strong>. Page Tabs still use our FBML infrastructure, rather than using an iframe in the browser. In order to correctly render FBML tags, our servers need to process the content at the Tab URL before it is sent to the user's browser. In practice, you can still use HTML, JavaScript (using FBJS) and CSS for your content, but there are a number of quirks.</p> <p>We are in the process of moving our Page Tab infrastructure a pure iframe solution currently, but we do not expect to complete that work <strong>until Q1 2011</strong>. In the meantime, we recommend that developers to minimize the amount of FBML code they can add to their apps.</p> </blockquote> <p>As you can see, we are <strong><em>IN</em></strong> the first quarter of 2011 so Page Tab IFrame support is around the corner!</strike> </p> <p><strong>EDIT:</strong><br> <a href="http://developers.facebook.com/blog/post/462" rel="noreferrer"><strong><em>IFrame support for Facebook Pages was added!!</em></strong></a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload