Domanda

I am trying to follow this tutorial

and tried to add this :

- (BOOL) application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    return [PFFacebookUtils handleOpenURL:url];
}
 z
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    return [PFFacebookUtils handleOpenURL:url];
}

'handleOpenURL:' is deprecated

I looked this up and surprisingly couldn’t find any solutions. What can I put instead?

È stato utile?

Soluzione

The documentation I found recommends using [FBAppCall handleOpenURL:sourceApplication:withSession:] If the tutorial is using outdated code, you may come across more problems so I recommend finding a newer one.

Using this method in your code:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [FBAppCall handleOpenURL:url sourceApplication:sourceApplication];
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top