iPhone - A problem with uploading video to facebook

眉间皱痕 提交于 2019-12-21 06:39:31

问题


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];

}


来源:https://stackoverflow.com/questions/5936214/iphone-a-problem-with-uploading-video-to-facebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!