My app is recieving a error when making a GET Request to the Facebook API for the endpoint me.
Here is my code:
-(void) updateUserInformation{
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"/me:" parameters:@{@"fields": @"id, name, email, user_birthday"}];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if(!error){
NSDictionary *userDictionary = (NSDictionary *)result;
NSMutableDictionary *userProfile = [[NSMutableDictionary alloc] initWithCapacity:8];
if (userDictionary[@"name"]) {
userProfile[@"name"] = userDictionary[@"name"];
}
if (userDictionary[@"first_name"]) {
userProfile[@"first_name"] = userDictionary[@"first_name"];
}
if (userDictionary[@"location"][@"name"]) {
userProfile[@"location"] = userDictionary[@"location"][@"name"];
}
if (userDictionary[@"gender"]) {
userProfile[@"gender"] = userDictionary[@"gender"];
}
if (userDictionary[@"birthday"]) {
userProfile[@"birthday"] = userDictionary[@"birthday"];
}
if (userDictionary[@"interested_in"]) {
userProfile[@"interested_in"] = userDictionary[@"interested_in"];
}
[[PFUser currentUser] setObject:userProfile forKey:@"profile"];
[[PFUser currentUser] saveInBackground];
}else {
NSLog(@"Error in Facebook Request %@", error);
}
}];
}
There error that I am getting is:
2015-10-11 14:30:59.306 MatchedUp[2358:139193] Error in Facebook Request Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=803, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={
body = {
error = {
code = 803;
"fbtrace_id" = "CfGbwnx4/B9";
message = "(#803) Some of the aliases you requested do not exist: me:";
type = OAuthException;
};
};
code = 404;
}, com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=404, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=(#803) Some of the aliases you requested do not exist: me:, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=0}
I am not very sure what this error means. It says "Some of the aliases you requested do not exist: me:" does that mean the result dictionary in the completionHandler does not contain some of the information for the endpoint me? Any help would be appreciated. Thank you!