ideashower / ShareKit

Drop in sharing features for all iPhone and iPad apps
http://getsharekit.com
1.79k stars 375 forks source link

Facebook: "session expired" #294

Open s-alexander opened 13 years ago

s-alexander commented 13 years ago

My user suffers from a message "Error. Session has expired at unix time 131401800. The current unix time is /current UNIX time/." He see this UIAlertView any time he's trying to share something with a Facebook, but I can't reproduce this issue on my own.

kevincupp commented 13 years ago

This may seem strange but ask him if the time and date are set correctly on his device. If he has an iPod Touch, I've seen the time on those get out of sync, and Facebook will reject SSL requests from a device that has an invalid timestamp on it.

s-alexander commented 13 years ago

I asked him and he said that time is valid. I got another issue: when I removed my Test application from my profile on facebook.com (I had to confirm it's access one more time on iPhone) I got an error 102: "The session has been invalidated because the user has changed the password.". And if I logout from Facebook.com (on my PC) I get an error 102 "The session is invalid because the user logged out."

I'm trying to handle theses errors (codes 400 - 499 and 102, - (void)request:(FBRequest)aRequest didFailWithError:(NSError)error in SHKFacebook.m) but they appear event after I call [SHKFacebook logout] - I had to relogin in application but looks like the session key remains the same...

I'm not very familiar with facebook API and ShareKit yet; may be I'm just doing something wrong?

Sorry for my english;)

s-alexander commented 13 years ago

Looks like I found a solution, but how should I share it? Looks like the main working tree is a bit abandoned, and I'm still not sure that my problem is a common problem

rajeshtomjoe commented 13 years ago

i have the same problem mentioned by alexander can someone help for this issue i am getting error in ipad 1 device

error "The session is invalid because the user logged out."

s-alexander commented 13 years ago

I fixed that bug in ShareKit code, but I'm not sure how I should share my solution with everyone. This repo looks abandoned

sindresorhus commented 13 years ago

@s-alexander check out https://github.com/ShareKit/ShareKit