Question:

Facebook had recently changed the application settings pages and "Post-Authorize Callback URL" is no longer there. How can I set it now?

 

 

 

 

Suggestion:

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

We can set the "Post-Authorize Callback URL" programmatically via using the Old REST API.

Sample code (based on the Old PHP Client Lib) is shown below:

$properties = array('authorize_url' => 'http://www.takwing.idv.hk/test/' );
$ret_code = $facebook->api_client->admin_setAppProperties($properties);

Once the field is set, you can in fact see it in the "Facebook Integration" page of the Application Settings.

I have tried to do the same by calling the Old REST API via the PHP SDK. The following code is used:

 $properties = array('authorize_url' => 'http://www.takwing.idv.hk/test/');
 $old_rest_call_param = array('method' => 'admin.setAppProperties',
                              'access_token' => $session['access_token'],
                              'properties' => $properties);
 $ret_code = $facebook->api($old_rest_call_param); 

However, the following error is returned:

Fatal error: Uncaught Exception: 15: The method you are calling or the FQL table you are
querying cannot be called using a session secret or by a desktop application. 

FYI, no matter the "access_token" is there or not, the same error is returned.

If you see anything wrong in my code, please let me know. And I haven't try to the same via the JavaScript SDK or using curl.

 

 

 

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