Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle oauth_problem #145

Merged
merged 2 commits into from Jan 4, 2012
Merged

Handle oauth_problem #145

merged 2 commits into from Jan 4, 2012

Conversation

scompt
Copy link
Contributor

@scompt scompt commented Dec 27, 2011

Fixes #144 by handling the case where an OAuth provider returns the oauth_problem parameter. See here for what this parameter can mean.

Replace NSLog with SHKLog in all ShareKit classes
Get rid of a commented-out method
@VilemKurz
Copy link
Contributor

Theoretically in a case user presses cancel there should be no alert. ShareKit should behave the same way as if cancel of the whole view is pressed -> SHKOAuthView itself would make a check of the return value, and if user cancels it would call [self cancel].

BUT

LinkedIn uses user_refused (which can be used on other errors too?) instead of permission_denied.

I have looked at other services, and it seems there are many, which do the same (myspace, StatusNet, ..) . I think the best solution could be to incorporate your fix (for various oauth_problems) + in SHKOAuthView make a check if the user cancelled (user_refused + permission_denied) - if yes, call [self cancel] and do not show the alert. If you agree with this, I will make a separate pull request for that.

+1 for this pull request

edit: permission_denied seems to have different meaning, so I would leave alert for this one.

edit2: your fix should also cure #121 and maybe other not yet discovered crashes too.

@bluesuedesw
Copy link

FYI - I'm still seeing this crash with the LinkedIn cancel button on iOS 5 with the above changes.

@VilemKurz
Copy link
Contributor

The fix is OK, I have just tested it. Please be aware, that it is not merged in master yet...

VilemKurz added a commit that referenced this pull request Jan 4, 2012
@VilemKurz VilemKurz merged commit 6d2588f into ShareKit:master Jan 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LinkedIn Sharer causes a crash
3 participants