'Facebook - problems with "august_2012" platform migration

I am getting this warning message in an iOS app using FB auth:

ERROR:This endpoint has been deprecated.To temporarily reenable it,you may disable the "august_2012" platform migration. It will be disable permanently on August 1,2012.

The issue is to disable that migration for now. But, it was already disabled, so not sure how to fix this quickly - as opposed to updating the app and pushing it back out to the store which we will do.



Solution 1:[1]

I solved it by using the newest ShareKit Version (0.2.1), which I downloaded from GitHut but the same version is also avaliable on getsharekit.com/install.

Next i added the folder "ShareKit" located in "Classes" by drag&dropping in my XCode project (as usual).

For safety reasons, the previouse configuration file has been changed into a class. Set the configuration data for the sharingservices (FB, Twitter,...) in the class "DefaultSHKConfigurator.m". (Btw. I subclassed the DefaultSHKConfigurator so i still have the original structure)

To setup FB, change the settings:

- (NSString*)facebookAppId {
return @"..."; //app-id from facebook (create fb-app first, if not already done)
}

- (NSString*)facebookLocalAppId {
    return @"";
}

Than in the application:didFinishLaunchingWithOptions: Method, set the ShareKonfiguration.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

DefaultSHKConfigurator *configurator = [[DefaultSHKConfigurator alloc] init];

[SHKConfiguration sharedInstanceWithConfigurator:configurator];

[configurator release];

//init the rest
..
}

After that, add an URL Scheme (in XCode 4.x select your project, select one target, click "Add"->"Add URL Type") and set the URL Scheme to "fb+your fb-app id" (mine looked like "fb35486..").

To let FB open your app and the user is immeditly able to post content, add

- (void) openFBWithURL:(NSURL*) URL {

if (URL != nil) {

    NSString* scheme = [URL scheme];

    NSString* prefix = [NSString stringWithFormat:@"fb%@", SHKCONFIG(facebookAppId)];

        if ([scheme hasPrefix:prefix]) {

            [SHKFacebook handleOpenURL:URL];
    }
}
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {

        [self openFBWithURL:url];

    return YES;
}

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {

        [self openFBWithURL:url];

    return YES;
}

Than it should be setup and ready for use.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NicTesla