iPhone Facebook Video Upload

前端 未结 5 1439
[愿得一人]
[愿得一人] 2020-12-01 03:35

I\'ve been working on this for a couple of days now and just can\'t seem to find a straight answer or example anywhere. I am trying to upload a video to facebook from within

5条回答
  •  伪装坚强ぢ
    2020-12-01 03:47

    You can use new graph api to upload video :

    • Use me/videos as graph path
    • Add user_videos permission to your app
    • Set filename to match your file's extension in the POST request (after Content-Disposition:)

    You can use this fork https://github.com/johnmph/facebook-ios-sdk and have a param dictionary like that :

    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:movieData, @"source", @"File.mov", @"filename", nil];
    [m_facebook requestWithGraphPath:@"me/videos" andParams:params andHttpMethod:@"POST" andDelegate:self];
    

    I added also to this fork a method to track the upload status (by example to use with a progress bar)

提交回复
热议问题