Reputation: 355
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?
Upvotes: 2
Views: 535
Reputation: 355
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.
Upvotes: 2