TMTumblrSDK icon indicating copy to clipboard operation
TMTumblrSDK copied to clipboard

PhotoPostExample authentication issue

Open KBIOS997 opened this issue 8 years ago • 9 comments

we are run PhotoPostExample with tumblr library with photo upload from device we got "Error Domain=Request failed Code=401 "(null)”” error.

[TMAPIClient sharedInstance].OAuthConsumerKey = @"... ....."; [TMAPIClient sharedInstance].OAuthConsumerSecret = @"... ...."; [TMAPIClient sharedInstance].OAuthToken = @"... ...."; [TMAPIClient sharedInstance].OAuthTokenSecret = @"... ....";

[[TMAPIClient sharedInstance] photo:@"404pik.tumblr.com" filePathArray:@[[[NSBundle mainBundle] pathForResource:@"blue" ofType:@"png"]] contentTypeArray:@[@"image/png"] fileNameArray:@[@"blue.png"] parameters:@{@"caption" : @"Caption"} callback:^(id response, NSError error) { if (error) NSLog(@"Error posting to Tumblr"); / bellow error return... Error Domain=Request failed Code=401 "(null)”” error. */

                               else
                                   NSLog(@"Posted to Tumblr");
                           }];

KBIOS997 avatar Mar 17 '16 11:03 KBIOS997

I have a different error.

callback return TMTumblrSDKErrorDomain.

{
  "TMTumblrSDKHTTPStatusCodeErrorKey" : 404,	
  "NSLocalizedDescription" : "Request failed."	
}

ykws avatar Jun 22 '17 12:06 ykws

Success authenticate and userInfo . Failed photo .

ykws avatar Jun 22 '17 13:06 ykws

Forgot to fill in my blog name, so right that return not found. But even if that, callback return TMTumblrSDKErrorDomain. HTTP status code changed from 404 to 400 .

{
  "TMTumblrSDKHTTPStatusCodeErrorKey" : 400,	
  "NSLocalizedDescription" : "Request failed."	
}

and response.

{
  "erros": [
    {
      "errros": "Error uploading photo."
    }
  ]
}

ykws avatar Jun 22 '17 14:06 ykws

Similar to #36

ykws avatar Jun 22 '17 14:06 ykws

Similar to #65

ykws avatar Jun 22 '17 14:06 ykws

Success text .

ykws avatar Jun 23 '17 00:06 ykws

Success post when type is photo , parameters has data64 and encoded base 64 image. Broken photo ?

ykws avatar Jun 23 '17 01:06 ykws

@senjaliya1989 try it merge #132

ykws avatar Jun 23 '17 05:06 ykws

thank's Yoshiyuki kawashima,

currently working fine.

On Fri, Jun 23, 2017 at 11:18 AM, Yoshiyuki Kawashima < [email protected]> wrote:

@senjaliya1989 https://github.com/senjaliya1989 try it merge #132 https://github.com/tumblr/TMTumblrSDK/pull/132

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tumblr/TMTumblrSDK/issues/113#issuecomment-310577760, or mute the thread https://github.com/notifications/unsubscribe-auth/AF27FottelTvEjy-6Gpao5lAfnK39beqks5sG1GygaJpZM4Hy28W .

KBIOS997 avatar Jun 23 '17 06:06 KBIOS997