Hello im looking to do this too.
Basically i need to upload a photo in uncompressed format to facebook, and also need to download from facebook.
for the upload part, i can use the function given by michelle.
Quote:
- (void)uploadPhoto {
// NSString *path = @"http://www.facebook.com/images/devsite/iphone_connect_btn.jpg";
NSURL *aUrl = [NSURL URLWithString:url];
NSData *data = [NSData dataWithContentsOfURL:aUrl];
UIImage *img = [[UIImage alloc] initWithData:data];
NSData* cData = UIImageJPEGRepresentation(img, 1.0);
UIImage *image = [[UIImage alloc] initWithData:cData];
NSDictionary *params = nil;
[[FBRequest requestWithDelegate:self] call:@"facebook.photos.upload" params arams dataParam NSData*)image];
NSLog(@"image uploaded");
}
|
But this method is not standalone right? It needs the FB Connect classes?