iPhone - A problem with uploading video to faceboo

2019-04-02 19:39发布

问题:

I am having a problem uploading a video to facebook.

Last month, it worked OK.

I can still log in to FaceBook with my appKey and appSecretKey, but if I request 'facebook.video.upload' method to facebook, the site does not reply.

In the past, it worked perfectly.

What is the problem? Has FaceBook updated the interface?

Thanks!

回答1:

For me I use FBVideoUpload (source code here) and it works fine, so I put my code here:

m_Facebook = [[Facebook alloc] init];
m_FacebookUploader = [[FBVideoUpload alloc]init]; 
NSArray *permissions =  [NSArray arrayWithObjects:@"publish_stream", @"offline_access",nil];
m_Facebook.forceOldStyleAuth = YES;
[m_Facebook authorize:APP_ID permissions:permissions delegate:self];

In Facebook delegate methods

- (void)fbDidLogin
{
    NSURL *movieURL = [NSURL fileURLWithPath:m_MoviePath];

    NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                            @"Look at my funny video !", @"title",
                            @"A message", @"description",
                            nil];

    [m_FacebookUploader setApiKey:APP_ID];
    [m_FacebookUploader setAccessToken:m_Facebook.accessToken];
    [m_FacebookUploader setAppSecret:APP_SECRET];
    [m_FacebookUploader startUploadWithURL:movieURL params:params delegate:self];

}