下载Facebook视频(没有用户访问令牌)

时间:2017-09-18 11:29:44

标签: objective-c facebook-graph-api

尝试获取Facebook视频数据(视频网址,缩略图,desc等...)

Facebook返回错误"访问令牌"

  • 视频是公开的

    url_str = @"https://www.facebook.com/DonaldTrump/videos/vb.153080620724/10159664271045725/?type=2&theater";
    
    
    
    
    FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                                  initWithGraphPath:[NSString stringWithFormat:@"%@",url_str]
                                  parameters:@{@"fields": @"id, source,picture"}
                                  HTTPMethod:@"GET"];
    [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                          NSDictionary* result,
                                          NSError *error) {
    
    
        if(result){
    
        }
        else{
    
        }
    
    
    
    }];
    

错误消息:

   body =     {
        error =         {
            code = 104;
            "fbtrace_id" = G2cJAV2mSlS;
            message = "An access token is required to request this resource.";
            type = OAuthException;
        };
    };
    code = 400;

0 个答案:

没有答案