The welcome page of my app does not require any authentication/authorization. On this page is a form that the user perform registration. Only at that time my application will perform the authentication/authorization and then handle the registration.

My problem is "after the authorization, the user submitted data is lost". Is there anything to do what I want?




Appreciate if you can like this page if you find it useful! - Click "Like"

When user submits the form (e.g. to register.php), you should capture the submitted data and then append it to the "next" URL that Facebook will redirect the user to after the authentication/authorization process.

Assuming you are using the PHP SDK, the above idea is illustrated in the following code sample:

if (!$fbme) {
 $loginUrl = $facebook->getLoginUrl(array('canvas' => 1,
                                          'fbconnect' => 0,
                                          'req_perms' => 'publish_stream',
                                          'next' => $actual_register_script . '&formData1='.$_POST[formData1],
                                          'cancel_url' => $appCanvasPage ));
 // then redirect the user to the loginUrl



Find my FAQ on Facebook Development useful? Download the PDF for all the FAQs HERE!