since this week my iOS App has a problem accessing FB (via iOS FB SDK). Following error occurs:
013-06-18 15:44:16.756 foo-coffee[2441:907] Error: HTTP status code: 500
2013-06-18 15:44:16.761 foo-coffee[2441:907] Errrror: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x21051e70 {com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 1;
message = "An unknown error has occurred.";
type = OAuthException;
};
};
code = 500;
}, com.facebook.sdk:HTTPStatusCode=500}, (null)
The error occurs in the following function:
- (void)getFbFields:(CLLocationDegrees)lat longitude:(CLLocationDegrees)lng {
NSString *fbquery = [NSString stringWithFormat:@"search?type=place¢er=%f,%f&distance=3000&fields=name,cover", lat, lng];
[FBRequestConnection
startWithGraphPath:fbquery
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
if (!error) {
[self readFbResponse:result];
} else {
NSLog(@"Errrror: %@, %@", error, result);
}
}];
}
A possibility for the error could be the FB "July 10, 2013 Migration". Here I have in my developer-account the Message: A graph search endpoint without an access token.
In the Roadmap for July 10, 2013 Migration is stated:
Graph API search changes User access tokens will be required for all search Graph API calls except Posts, Places and Pages. App access tokens may also be used for Post search Graph API calls. Places and Pages search Graph API calls will still require an App access token. Search for Applications will no longer be supported.
So it seems that I need the "App access token". How do I integrate the "App access token" best? As parameter in the search URL or in another way?
cheers -- erik