Edited at

【objective-c】lineに投稿する(備忘録)

More than 3 years have passed since last update.


xcodeでlineに投稿する

UIImageのlineImgを宣言して、UIImagePNGRepresentation( )

                           ↑ここに入れた

UIImage *lineImg = UIGraphicsGetImageFromCurrentImageContext() ;

UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[pasteboard setData:UIImagePNGRepresentation(lineImg) forPasteboardType:@"public.png"];
NSString *LineUrlString = [NSString stringWithFormat:@"line://msg/image/%@", pasteboard.name];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:LineUrlString]];

出典:

http://lab.dolice.net/blog/2013/06/29/objc-share-to-social/