Creating apps for Facebook.

I am trying to create my first application running inside Facebook Canvas / IFRAME . I am using Zend Framework (PHP) for this project.

But I cannot understand all the different ways that facebook suggests.

There is an SDK SDK that still works. Is there a Javascript SDK and something like FBJS? Does anyone know what to start? The documentation is not updated most often.

I was able to login and show my photo and name inside the app, the main stuff works.

+2


a source to share


2 answers


Canvas App - facebook puts your code directly on the page (well, sort of), you have access to FBML (facebook special tags), limited HTML, CSS (cached on the Facebook side) and limited JS known as FBJS (wrapper for native JS -commands for security reasons, no jquery or something). Your canvas app is still hosted on your server and you can use the server side PHP API (and whatever, it's a page on your server).

Frame App - facebook just puts an iframe on the page embedding some kind of page on your server. An iframe can contain whatever you want, it is just a regular page without any additional requirements. You can use HTML, JS (jquery, etc.), PHP API PHP server side. There is no FBJS as it is not needed, but you can use the JS API (with similar functionality to the PHP API, just for the frontend). FBML is not directly supported, but you can use FBML tags on any site after they are declared:



<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">

The advantages of using the Canvas App are no annoying iframe scrolling, faster FBML access, and tighter integration in general.

+1


a source


Facebook JS is how you can use your own javascript on a facebook page without colliding with or colliding with facebook. It does this by rewriting your javascript, so you need to work around how to rewrite javascript and use a library provided by facebook for ajax and events, not your own like jQuery, and in many cases not even the native browser api.

The Javascript SDK allows you to access facebook data from another site using javascript. The Social Graph API has extended this accessibility as well as extended it.

Server data access = via provided php api.



Data access with client data = via javascript SDK.

FBJS, on the other hand, is facebook's use of javascript for canvas apps.

+1


a source







All Articles