Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Share video on Facebook using ASIFormDataRequest

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.04k
    Comment on it

    In facebook graph API "" url is used for all APIs. But to post a video on facebook an other API url is provided. To post video on facebook you must use "" API.

    Below is the code for sharing video on facebook using ASIFormDataRequest.

    -(void)shareVideoOnFacebook:(NSData*)data WithTitle:(NSString*)title{
         NSURL *url = [NSURL URLWithString:@""];
        ASIFormDataRequest *newRequest = [ASIFormDataRequest requestWithURL:url];
        [newRequest setPostValue:title forKey:@"title"];
        [newRequest addData:data withFileName:@"" andContentType:@"multipart/form-data" forKey:@"file"];
        [newRequest setPostValue:yourAccessToken forKey:@"access_token"];
        [newRequest setRequestMethod:@"POST"];
        [newRequest setDidFinishSelector:@selector(postVideoOnFacebookFinished:)];
        [newRequest setDidFailSelector:@selector(postVideoOnFacebookfailed:)];
        [newRequest setDelegate:self];
        [newRequest startAsynchronous];

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: