Work through the tutorial once and I'm sure you'll have a much better understanding. It will ask the user for permissions, authenticate the session etc without you needing to do anything). For example, if the session has expired you can just redirect the user to a login page where there will a facebook login button (this button is provided by facebook in the SDK and it handles authentication flow for you. These helpers will determine if session is active, expired etc and call a method onSessionStateChanged() whenever there is a change in the session state.Īll you need to do is perform simple checks in this method and redirect the user appropriately. In it's authentication section, it is shown clearly how to handle session state changes.īasically, facebook provides you with a bunch of UI lifecycle helper classes that you need to include wherever you need facebook functionality in your app. You don't need to handle the Session object states yourself at all. Also, it reconnects the internet connection.The SDK is designed to be used a bit differently than what you are trying to do here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |