Skip to content

Commit

Permalink
Fixes Twitter oauth authentication error (oauth_verifier parameter mi…
Browse files Browse the repository at this point in the history
…ssing) when not using the iOS 5 Twitter Framework

Fixes Twitter oauth authentication error (oauth_verifier parameter
missing) when not using the iOS 5 Twitter Framework.
  • Loading branch information
SteveLeviathan committed Apr 5, 2013
1 parent a23b538 commit 7aab776
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Classes/ShareKit/Sharers/Services/Twitter/SHKTwitter.m
Expand Up @@ -268,7 +268,16 @@ - (void)tokenAccessModifyRequest:(OAMutableURLRequest *)oRequest
value:@"client_auth"] autorelease];

[oRequest setParameters:[NSArray arrayWithObjects:username, password, mode, nil]];
}
} else {
if (self.pendingAction == SHKPendingRefreshToken)
{
if (accessToken.sessionHandle != nil)
[oRequest setOAuthParameterName:@"oauth_session_handle" withValue:accessToken.sessionHandle];
}

else
[oRequest setOAuthParameterName:@"oauth_verifier" withValue:[authorizeResponseQueryVars objectForKey:@"oauth_verifier"]];
}
}

- (void)tokenAccessTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
Expand Down

2 comments on commit 7aab776

@VilemKurz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to follow our wiki install page literally. This way you have all the files + you'll get a possibility to easily update ShareKit in the future.

@VilemKurz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What json class? There is no more JSONKit in ShareKit. Just follow ALL steps from wiki carefully and you are set.

Please sign in to comment.