Facebook SDK use Graph API version 1.0
facebook, facebook-graph-api, ios, objective-c
Solution
This can be accomplished at the `FBRequest` level.
You need to create the FBRequest yourself and use `overrideVersionPartWith:`.
Keep in mind this will only work if your Facebook app was created before the v2.0 API was released. Newer apps are blocked from using the old API at all.
It will look something like this:
FBRequest *request = [FBRequest requestWithGraphPath:@"/me/friends"
parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"20", @"limit", nil]
HTTPMethod:@"GET"];
[request overrideVersionPartWith:@"v1.0"];
[request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (!error) {
// Success! Include your code to handle the results here
NSLog(@"***** user friends with params: %@", result);
} else {
// An error occurred, we need to handle the error
}
}];
Problem
There are some differences between the Facebook graph API versions 1.0 and 2.0 that I'm not so fond of so I would like to downgrade to the graph API version 1.0. Any ideas how to do this? Here's the code I'm using right now, which makes a call to version 2.0: ``` [FBRequestConnection startWithGraphPath:@"/me/friends" parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"20", @"limit", nil] HTTPMethod:@"GET" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { if (!error) { // Sucess! Include your code to handle the results here NSLog(@"***** user friends with params: %@", result); } else { // An error occurred, we need to handle the error } }]; ```