Possible Duplicate:
How to post photos to facebook iphone fbconnectFacebook的錯誤得到圖像
我使用FB SDK,卻得到了錯誤,而在我看來,上傳的FB後的畫面從我的應用程序 沒有負載我已經和的UIImageView其中有我需要的圖像FB上張貼的視圖的代碼做負載
ImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 65, 65)];
ImageView.center = CGPointMake(42, 43);
[View addSubview:ImageView];
,在我的FB後的方法,我這樣做
UIImage *image = [[UIImage alloc]init];
image = ImageView.image;
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:3];
[params setObject:@"LINK_HERE" forKey:@"link"];
// due to this line below, i am getting an error :
// "[UIImage length]: unrecognized selector sent to instance 0x170fa0e0"
// and if use http link instead of image(UIImage) it works, but i want to use my image
[params setObject:image forKey:@"picture"];
[params setObject:@"NAME_HERE" forKey:@"name"];
[params setObject:@"DEC_HERE" forKey:@"description"];
// Invoke the dialog
[self.facebook dialog:@"feed" andParams:params andDelegate:self];
如何守ld我在這段代碼中使用我的UIImage ...任何想法?
http://yashesh87.wordpress.com/2012圖片/ 10/01/social-framework-integration-iphone-sdk-ios/easy上傳圖片的方法。 – jamil
請在這裏查看我的答案。 http://stackoverflow.com/questions/6959961/how-to-post-photos-to-facebook-iphone-fbconnect/6960239#6960239 –