I'm making an facebook app by using Xcode4.2 and Facebook SDK latest version. I copied Hackbook to my app and replaced some method name. Then it worked ![enter image description here][1]
But when I click 'Okay' button, no response is happened. I checked details. Somehow iOS doesn't call OpenURL in appdelegate.m.
Why iOS doesn't call the method? Here's the code.
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [self.facebook handleOpenURL:url];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [self.facebook handleOpenURL:url];
}
Please let me know what's happend.
Thanks in advance.
Have you set your app's Facebook ID in your app's property list file? If you haven't, Facebook's app doesn't trigger the callback to your app.
Read the instructions here, in the section called "Modify the app property list file": https://developers.facebook.com/docs/mobile/ios/build/
Basically you need to create a new row in your app's plist named URL types, with a single item, URL Schemes, containing a single value, fbYOUR_APP_ID (the literal characters fb followed by your app ID).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With