please help me to upload image on facebook using iphone app.here i dont have the url.i just only have the image.but i cant upload it on face book.if i can use an url then i can simply upload it.please help me.
please send me the code for upload image. i already create facebook instance and other codes relative to fbconnect ios.
Make sure you've downloaded the most recent version of the Facebook app. You can also try to close and restart the app. Restart or update your mobile device: Make sure you're using the most recent version of the operating system for your mobile device.
I can't upload photos on FacebookMake sure that you have a strong Wi-Fi or network connection. Try uploading the original photo instead of an edited version. Check the size of the photo. We recommend uploading photos under 15MB.
The DemoApp that comes with the facebook ios api contains the code to upload a photo in the sample:
https://github.com/facebook/facebook-ios-sdk/tree/master/sample/DemoApp
/**
* Upload a photo.
*/
- (IBAction)uploadPhoto:(id)sender {
NSString *path = @"http://www.facebook.com/images/devsite/iphone_connect_btn.jpg";
NSURL *url = [NSURL URLWithString:path];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
img, @"picture",
nil];
[_facebook requestWithMethodName:@"photos.upload"
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
[img release];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With