Facebook视频上传错误

时间:2011-02-16 11:44:16

标签: iphone facebook-graph-api

Facebook视频上传错误:我正在使用旧的组合 和链接https://github.com/zoul/facebook-ios-sdk/commit/efb4b44fad333f8daa70a517bb5328b9352320df中的新API / SDK 我正在视频上传课程

中正确获取会话ID

- (void) startUploadWithURL: (NSURL*) movieURL params: (NSDictionary*) userParams delegate: (id ) delegate
{
    apiKey = @"5c009deec3b253bef6fe6cdd97e86b3f";
    appSecret = @"218421681dfb46043bed3dd25a03bbce";

    if ([self sessionID] == nil) {
        NSLog(@"Unable to retrieve session key from the access token.");
        return;
    }
    printf(" \n\n session id == %s",[[self sessionID] UTF8String]);

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:userParams];
    [params setObject:@"1.0" forKey:@"v"];
        [params setObject:@"facebook.video.upload" forKey:@"method"];
        [params setObject:[self sessionID] forKey:@"session_key"];
        [params setObject:apiKey forKey:@"api_key"];
        [params setObject:[self signatureForParams:params] forKey:@"sig"];
       [params setObject:[NSData dataWithContentsOfURL:movieURL] forKey:[movieURL lastPathComponent]];
        [[FBRequest getRequestWithParams:params httpMethod:@"POST" delegate:delegate requestURL:kAPIURL] connect];

}

它返回错误的结果,而不是将视频上传到Facebook

1 个答案:

答案 0 :(得分:0)

如果不使用图形API,您可以将视频上传到facebook.login facebook并转到此link。在那里你会得到一个像xyz@m.facebook.com的id。只需将你的视频邮寄到这个邮件id。你可以使用MFmailcompossor从你的应用程序撰写邮件。

希望这个帮助