followers 10 popularity
following 1

following  view all

FacebookDeveloper is not in any groups


Facebook App Developer
John Aliston | FacebookDeveloper

Error Handling In A Facebook Application

Aug 15th 2013 at 1:09 AM

Most developers that have more complex applications with a large number of users are certainly met with a trio of popular errors:
Error in validating access token..

Connection timed out

And my favorite JS SDK for PHP something is broken"
In this article we take a look behind the scenes of these and would outline the optimal solution.

Facebook App Development Error in validating access token

To allow applications to communicate with the Facebook API must somehow Facebook Platform communicate "yes, I'm the application xyz".

When will authorization application  without problems in your hands access token with some validity. Error " error in vali .... " occurs at the moment when his application access tokenism prove invalid.

Unfortunately, it is in fact in most cases the application author innocently.

Especially when these errors happen randomly and unpredictably Facebook just from time to time your access token invalidated - a proxy on the way to your something done, your server did not respond within a certain time, etc. The solution is to use these critical areas try-catch blocks

App Errors

Connection timed out

This error is worse variant of previous errors and that it can not be caught and not at all predictable.

The situation occurs if your server already so burdened with Facebook communications that other user applications simply run out of time.

For this error, you should ONU sinister " five hundred "capture (if possible framework or your own error page in hatches), kindly inform the user that something is the way forward and smashed it on the main page of the application with the requirement to try again for a while.

If something broke

To encounter this error in Facebook JS SDK (i.e. dialogues, dialogues stream, friend selector etc.). What to do? Utmost care as possible to notify users accordingly

Now on Git Hub download Facebook files three libraries. These are:

There is a decent Facebook application without at least a simple communication with Facebook. Edit index php in the following form (explanation in the code):


Congratulations on your first application on Facebook.

Today, we have created the simplest possible variant code with a simple background check whether or not a user is logged in to Facebook.

Informatio Resource By  ==>

Please to comment

sign in

Remember Me

New to IM faceplate? join free!

Lost Password? click here