Facebook 视频上传错误

发布于 2024-10-17 23:02:46 字数 1355 浏览 1 评论 0原文

Facebook 视频上传错误:我正在使用旧的组合 以及链接中的新 API/SDK https://github.com/zoul/ facebook-ios-sdk/commit/efb4b44fad333f8daa70a517bb5328b9352320df 我在视频上传类中正确获取会话 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

Facebook video upload error: i'm using the combination of the old
and the new API/SDK from the link https://github.com/zoul/facebook-ios-sdk/commit/efb4b44fad333f8daa70a517bb5328b9352320df
and i m getting session id properly in the video Upload class


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

}

its returning the wrong result and not uploading video to the Facebook

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

巾帼英雄 2024-10-24 23:02:46

不使用图形 API,您可以将视频上传到 facebook.login facebook 并转到此链接。在那里你会得到一个类似于 [email protected] 的 ID。只需邮寄你的视频到此邮件 ID。您可以使用 MFmailcompossor 从您的应用程序撰写邮件。

希望这有帮助

Without using graph api you can upload videos to facebook.login facebook and go to this link. there you will get a id like [email protected] .just mail your videos to this mail id.you can use a MFmailcompossor to compose mail from your app.

Hope this help

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文