Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Forced the update request to use SSL

This is related to a Twitter bug - see the comments above the call in code.
  • Loading branch information...
commit c349c1e8e055cfd2c9e59e9e1c1efc34d1b55108 1 parent 8be7363
Rodrigo Sieiro rsieiro authored

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +6 2 TwitterDemo/Twitter/RSTwitterEngine.m
8 TwitterDemo/Twitter/RSTwitterEngine.m
@@ -276,10 +276,14 @@ - (void)sendTweet:(NSString *)tweet withCompletionBlock:(RSTwitterEngineCompleti
276 276 NSMutableDictionary *postParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
277 277 tweet, @"status",
278 278 nil];
279   -
  279 +
  280 + // If the user marks the option "HTTPS Only" in his/her profile,
  281 + // Twitter will fail all non-auth requests that use only HTTP
  282 + // with a misleading "OAuth error". I guess it's a bug.
280 283 MKNetworkOperation *op = [self operationWithPath:TW_STATUS_UPDATE
281 284 params:postParams
282   - httpMethod:@"POST"];
  285 + httpMethod:@"POST"
  286 + ssl:YES];
283 287
284 288 [op onCompletion:^(MKNetworkOperation *completedOperation) {
285 289 completionBlock(nil);

0 comments on commit c349c1e

Please sign in to comment.
Something went wrong with that request. Please try again.