I’m looking to check to see if a user’s Facebook session is valid and if it is then redirect them to a certain view controller.
if ([facebook isSessionValid]) {
NSLog(@"session is valid");
}
I also tried:
if ([facebook isSessionValid]) {
[self performSegueWithIdentifier:@"SessionIsValid" sender:self];
}
and dragged a Storyboard segue with the identifier “SessionIsValid” to the viewController I want to be re-directed to if Facebook isSessionValid
I was wondering how I’d go about doing this. I’m using a Storyboard in an ARC enabled app.
thanks for any help
In your storyboard create a segue from your current viewcontroller to wherever you want the user to go if the session is valid. Then, in your code above add something like:
[self performSegueWithIdentifier:@"SessionIsValid" sender:self];You set the identifier by clicking on the segue that was created in the storyboard.