Fixes bug where pending action couldn't be restored after SSO login.
If developer uses FacebookSDK for other purposes in other parts of the app, calling openActiveSession from two places can cause crash or other unexpected behaviour. This fix opens session only if it is needed.
Saves pending data if we have writer permissions
Proper way to handle session after SSO login
Request all permissions at first login