Facebook graph api 类型为的facebook ios sdk请求名称和配置文件图片无效

Facebook graph api 类型为的facebook ios sdk请求名称和配置文件图片无效,facebook-graph-api,request,facebook-ios-sdk,Facebook Graph Api,Request,Facebook Ios Sdk,我想像下面这样做,但不起作用 NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"first_name,picture?type=normal", @"fields",nil]; [facebook requestWithGraphPath:@"me" andParams:params andDelegate:self]; 我使用的facebook ios sdk是 如果我想在一个请

我想像下面这样做,但不起作用

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"first_name,picture?type=normal", @"fields",nil];
[facebook requestWithGraphPath:@"me" andParams:params andDelegate:self];
我使用的facebook ios sdk是

如果我想在一个请求中要求他们,如何做?谢谢

我使用批处理请求,如

NSString *jsonRequest1 = @"{ \"method\": \"GET\", \"relative_url\": \"me?fields=first_name\" }";
NSString *jsonRequest2 = @"{ \"method\": \"GET\", \"relative_url\": \"me/picture?type=square\" }";
NSString *jsonRequestsArray = [NSString stringWithFormat:@"[ %@, %@ ]", jsonRequest1, jsonRequest2];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObject:jsonRequestsArray forKey:@"batch"];
[facebookDelegate requestWithGraphPath:@"me" andParams:params andHttpMethod:@"POST" andDelegate:self];
我得到的结果是

({
body = "{\"first_name\":\"Eric\",\"id\":\"100003742445201\"}";
code = 200;
headers =     (
            {
        name = "Access-Control-Allow-Origin";
        value = "*";
    },
            {
        name = "Cache-Control";
        value = "private, no-cache, no-store, must-revalidate";
    },
            {
        name = Connection;
        value = close;
    },
            {
        name = "Content-Type";
        value = "text/javascript; charset=UTF-8";
    },
            {
        name = ETag;
        value = "\"3be1c3dfc20761062712ae899cc7c402062300a7\"";
    },
            {
        name = Expires;
        value = "Sat, 01 Jan 2000 00:00:00 GMT";
    },
            {
        name = Pragma;
        value = "no-cache";
    }
);},
{
body = "<null>";
code = 302;
headers =     (
            {
        name = "Access-Control-Allow-Origin";
        value = "*";
    },
            {
        name = "Cache-Control";
        value = "private, no-cache, no-store, must-revalidate";
    },
            {
        name = Connection;
        value = close;
    },
            {
        name = "Content-Type";
        value = "image/jpeg";
    },
            {
        name = Expires;
        value = "Sat, 01 Jan 2000 00:00:00 GMT";
    },
            {
        name = Location;
        value = "http://profile.ak.fbcdn.net/hprofile-ak-snc4/573359_100003742445201_1494953237_q.jpg";
    },
            {
        name = Pragma;
        value = "no-cache";
    }
);
}
)

配置文件图像的位置不正确。为什么?

这是一个使用ios sdk的批处理示例

有关完整示例,请参阅

-(void) prepareMyBatchRequest {
    NSString *jsonRequest1 = @"{ \"method\": \"GET\", \"relative_url\": \"me?fields=first_name,picture\" }";
    NSString *jsonRequest2 = @"{ \"method\": \"GET\", \"relative_url\": \"me\" }";
    NSString *jsonRequestsArray = [NSString stringWithFormat:@"[ %@, %@ ]", jsonRequest1, jsonRequest2];
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObject:jsonRequestsArray forKey:@"batch"];
    [facebook requestWithGraphPath:@"me" andParams:params andHttpMethod:@"POST" andDelegate:self];
}

配置文件图像位于第二个标题中,是第二次呼叫。在我看来,这是正确的。