Fix for sharedSession use and state initialization

While trying to use the sharedSession attribute, I noticed that after a getLoginUrl, the state was stored in persistent data using the sharedSessionID.
After Oauth redirect, the state is checked before retrieving the code.
The state is initialized in Facebook constructor but currently before initSharedSession is called.
As the state is retrieved from persistent data, the sharedSession has to be initialized before.

I updated the code to fix this and have state correctly retrieved.