2

これは、Twitter に画像を投稿するために使用するコード ブロックです。

NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"info" ofType:@"png"];
    UIImage *image = [[UIImage alloc] initWithContentsOfFile:imagePath];
   NSData *imageData = UIImageJPEGRepresentation(image,.05);
    [_twitter postMediaUploadData:imageData fileName:@"splash_02" uploadProgressBlock:^(NSInteger bytesWritten, NSInteger totalBytesWritten, NSInteger totalBytesExpectedToWrite) {

    } successBlock:^(NSDictionary *imageDictionary, NSString *mediaID, NSString *size) {
        NSLog(@"xfdf=%@",imageDictionary);

    } errorBlock:^(NSError *error) {
          NSLog(@"xfdferror=%@",error);

    }];

応答は成功しましたが、画像が投稿されません

4

1 に答える 1