Question

So I'm trying to get the name of a page with the Facebook graph API using the iOS SDK:

NSDictionary* params = [NSDictionary dictionaryWithObject:@"id,name" forKey:@"fields"];

[[FBRequest requestWithGraphPath:[NSString stringWithFormat:@"%@", userId] parameters:params HTTPMethod:nil] startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
     name = [result objectForKey:@"name"];
     //do more stuff
}];

I'm getting the error

error = {
   code = 803;
   message = "(#803) Some of the aliases you requested do not exist: (null)";
   type = OAuthException;
};

My accesstoken is valid and it does work when I'm using the Graph API Explorer with the GET request 5120148605?fields=id,name,about,bio.

Anyone having an idea of this weird behaviour?

Was it helpful?

Solution

I now resolved this by userId = [NSString stringWithFormat:@"%@", userId]. Seems like I need this for pages but not for users.

I don't know why this is present or if someone else encountered this problem, but that's my way of solving it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top