0

请检查我的代码:

在这里,我正在尝试将屏幕截图上传到 Facebook 相册,但这不起作用

CGImageRef screen = UIGetScreenImage();    
self.image = [UIImage imageWithCGImage:screen];
CGImageRelease(screen);

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               self.image, @"picture",
                               nil];

[self.facebook requestWithGraphPath:@"me/photos"
                      andParams:params
                  andHttpMethod:@"POST"
                    andDelegate:self];

self.image 没问题,它用于代码的其他部分,一切看起来都不错。如果我为 ex 设置 self.image 为 [uiimage imagenamed@"example.png""] 一切正常。不同的是,一个 uiimage 存在于内存中,另一个存在于内存和设备中。

什么是错的?

谢谢

4

1 回答 1

0

解决了。问题是制作屏幕截图的错误方式。

于 2011-10-05T08:46:59.350 回答