When I set
[self presentModalViewController:Facebookcontroller animated:YES];
to
[self presentViewController:Facebookcontroller animated:YES completion:nil];
to erase the presentModalViewController:animated is deprecated: first deprecated in iOS 6.0
pops another warning:
Instance method ‘-presentModalViewController:animated:completion:’ not found (return type defaults yo ‘id’)
Are you sure
selfis a UIViewController in this context. You can call this code only from another UIViewController.Make sure you initialize the Facebookcontroller class first, you cannot pass just the class.
Facebookcontroller *facebookController = Facebookcontroller alloc] init];For iOS 6 use:
or
You can find the reference here.