The "Input Form" page is not that hard to migrate. The major issue that we need to handle is to allow the user to submit the form only when the user is connected.

 

User Experience in Accessing the migrated "Input Form" Page

As for the "My Friends" page, a session may or may not exist when a user accesses the "Input Form" page. As a result of this, the following processing will be adopted:

 

When the form is submitted, the submitted data will simply be displayed on the page as shown below:

Facebook dashboard header

 

Coding the "Input Form" Page (input_form.php)

 

Coding the "Processing Input Form" Page (process_form.php)

Migrating the process_form.php is even easier. This is because as in the original version running on the PHP SDK, we can simply reuse the PHP code that we use for displaying the data.


 

Try playing around with the code and see if you want to add any processing on the displayed data when the user logout/login from that page.

You can test drive the demo of Our 1st FB App (JS SDK) by visiting here.