3

我正在使用带有 iPhone-SDK 的 Facebook 方法 API。授权后,我尝试使用以下代码上传图片:

NSString *link = @"http://www.google.com/logos/2011/houdini11-hp.jpg";  
    NSURL *url1 = [NSURL URLWithString:link];  
    NSData *data1 = [NSData dataWithContentsOfURL:url1];  
    UIImage *img1  = [[UIImage alloc] initWithData:data1];  
    NSMutableDictionary *photos = [NSMutableDictionary dictionaryWithObjectsAndKeys:  
                                img1, @"picture",   
                                  nil];    
    [facebook requestWithMethodName:@"photos.upload"  
                  andParams:photos  
              andHttpMethod:@"POST"  
                andDelegate:self];

我收到了这个错误:

错误 DOMAIN = 操作无法完成。(facebookErrDomain 错误 324。)

提前致谢。

4

1 回答 1

0

您可以在此处查看所有错误代码..

http://www.takwing.idv.hk/tech/fb_dev/faq/general/gen_10.html

所以错误是缺少或无效的图像文件

于 2011-05-02T15:02:58.217 回答