crino / instagram-ios-sdk

Instagram SDK for iOS
http://www.followgram.me
228 stars 63 forks source link

Session invalidation issues when no internet connection #18

Closed rudyryk closed 11 years ago

rudyryk commented 11 years ago

Hi, Cristiano! First of all, thank you for the great library! :) :+1:

I've faced the problem: session is invalidated (token is set to nil) on any error, even if there's just no Internet connection.

I'm not sure if this is an issue with library - may be the best practice is to handle such errors outside, but I've got a workaround at the moment: https://github.com/rudyryk/instagram-ios-sdk/commit/d9ca9f2ff3d2131a24c6fe8c1772794f9f63ddd8

Session is invalidated only when we get @"OAuthAccessTokenException" error.

What do you think?

crino commented 11 years ago

hi @rudyryk thanks for your implementation. please make a pull request and i will be happy to merge it into the main project ;) wait for you pull request... ;)

rudyryk commented 11 years ago

Sure, you're welcome! :)