I want to upload video on Facebook .
for this I am using my this old code , but it is not allow me to post videos in Facebook .
- (id)initWithImage:(UIImage *)upload_image {
if (self = [super init]) {
self.uploadImage = upload_image;
}
return self;
}
/**
* this way the class is easily extensible to other file
* types as FB allows us to upload them into the graph…
* with little if any modification to the code
**/
- (void)appendDataToBody:(NSMutableData *)body {
/**
* Facebook Graph API only support images at the moment, surely videos must occur soon.
**/
NSData *picture_data = UIImagePNGRepresentation(uploadImage);
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"media\";\r\nfilename=\"media.png\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:picture_data];
}
Can anyone tell me what should I change here ? to post the video in Facebook?
you can download the official video upload tutorial given to below link
Official demo of the video Upload
And change into the API key which is created onto
https://developers.facebook.com
Form there copy API key and put into following method
And Also change into plist file also
Thanks and Regards,
Neon Samuel