AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Ios facebook session expired11/5/2022 ![]()
If you've had any different experience, or know of a better way to not force the user to authenticate over and over, let me know in the comments. ![]() #Ios facebook session expired Offline#I'm wondering if maybe the token you get when requesting offline access might have a longer life. Also, I've only tested this when requesting the publish_stream privilege for an application. Maybe down the road Facebook will start issuing tokens that work for longer. It's an improvement, but still pretty annoying. So, this technique will only save the user from repeat authentications in a 1-day period. There's a big gotcha, though: the expiration date that Facebook gives the token appears to be about 24 hours from when it was issued. Making these few small changes will store the access token and attempt to re-use it. if it *is* valid, no need to authenticate. only authorize if the access token isn't valid If your ipad is jailbroken then youll probably have to find another solution. on login, use the stored access token and see if it still works Try updating your ios version is there is one available. ![]() store the access token and expiration date to the user defaults #define ACCESS_TOKEN_KEY EXPIRATION_DATE_KEY Called when the user has logged in successfully. use these as the keys for storing the token and date in user defaults All it takes are changes to a couple of methods in DemoAppViewController.m: // around line 25 Rather than create my own example project to demonstrate, I'll just specify how you would change the Facebook Demo App to store the access token. So, when the app quits, your token is gone. The cause of having to go through the sign on process every time the app is re-launched is that, after successfully signing on the first time, the Facebook SDK doesn't save the access token it receives in a persistent manner. The first time the user authenticates, it'll ask for access, but every time after that, it just tells the user that they already approved the application for access, and they just have to tap "Okay". The docs are good, and the whole process was pretty straightforward, but one aspect of the authentication process really annoys me: Every time my app launches again, the user must go through the authentication process with Facebook. I used the newer Sign Sign-On feature, which briefly takes the user to the Facebook app to ask them whether your app can access their Facebook profile. Recently I added Facebook image sharing to Glory Math 1, and it was my first experience with the Facebook iOS SDK. If you want further assistance, we are always here for extra help.Saving Sessions with the Facebook iOS SDK The above mentioned tricks would help you fix the Facebook log-out problem. Sometimes, it could be a simple glitch from the Facebook end. #Ios facebook session expired install#It is safe to install anti-virus software for the regular function of your electronic gadgets. This is often happens with users when they try to download something from a browser. ![]() Your device could be infected with the virus. #Ios facebook session expired how to#Related: How To Solve & Facebook Account Restricted Issue? Malware
0 Comments
Read More
Leave a Reply. |