私の要求:
<FBRequestConnection: 0x93a8ba0, 1 request(s):(
<FBRequest: 0x9395c90, session: 0xa8aeb80, graphPath: https://graph.facebook.com/me, HTTPMethod: GET, parameters:
{
"access_token" = BAAG4P63ZBHK0BAObimWrMZCGOzn3s6qOtqynyzkJmIN0fKiKGlCkmlqlKMcpbvrrhN9QJsIxrTc7PZCFoceuCwAC2ygCph27WV72iwxkbi2svKCDemDo8BBqOwc6bp6DQH7U9tjp4gZBofb4brYg;
fields = name;
format = json;
"migration_bundle" = "fbsdk:20120913";
sdk = ios;
})>
私の反応:
result (null)
error Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x93b1ad0 {com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 100;
message = "(#100) Unknown fields: name.";
type = OAuthException;
};
};
code = 400;
}, com.facebook.sdk:HTTPStatusCode=400}
背後にある理由は何ですか?フィールドなしで送信した場合= name; 次に、デフォルトのユーザー データをいくつか取得します。
呼び出し:
FBRequest *graphRequest = [[FBRequest alloc] initWithSession:[FBSession activeSession]
graphPath:request.graphPath
parameters:request.parameters
HTTPMethod:request.httpMethod];
FBRequestConnection *connection = [[FBRequestConnection alloc] init];
[connection addRequest:graphRequest
completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
[self requestCompleted:connection result:result error:error];
}];
[connection start];
リクエスト オブジェクト:
-(NSString*)graphPath
{ return @"https://graph.facebook.com/me"; }
-(NSDictionary*)parameters
{
return [NSDictionary dictionaryWithObjectsAndKeys:
@"name", @"fields",
nil];
}
-(NSString*)HTTPMethod
{
return @"GET";
}
固定パラメータでも試してみましたが、効果はありません:
graphRequest = [[FBRequest alloc] initWithSession:[FBSession activeSession]
graphPath:@"https://graph.facebook.com/me"
parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"name", @"fields", nil]
HTTPMethod:@"GET"];