I am using this following block which is mentioned in Facebook Developer. But when my App callbacks from Browser then it is always returning Cancelled result.
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logInWithReadPermissions:@[@"email"]
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
// Process error
}
else if (result.isCancelled) {
// Handle cancellations
}
else {
// If you ask for multiple permissions at once, you
// should check if specific permissions missing
if ([result.grantedPermissions containsObject:@"email"]) {
// Do work
}
}
}];
this update comes on 25 March 15,
If anyone used this then please share it with me.
Reference : https://developers.facebook.com/docs/ios/getting-started
The current version of the Facebook SDK for Android is version 14.1. 0 and requires the Android API 15. Code and samples for the Facebook SDK for Android are available on GitHub.
Login into Facebook and navigate to https://developers.facebook.com/apps/ Select the App you want to upgrade (you might have access to multiple apps) Click Settings > Advanced. Select the latest version under the Upgrade API Version section for both “Upgrade All Calls” and “Upgrade Calls for App Roles”
You must add the following method in your appDelegate
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
If the above method is not present into AppDelegate then it results into cancelled state.
Refer to : https://developers.facebook.com/docs/ios/getting-started#startcoding
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