I've done a google plus integration and i've done a simple login and displaying google friends on table. But the problem is before I load the friends I want to check if the user is logged in, so in my friendsdisplayViewController i've done something like this
if ([GPPSignIn sharedInstance].authentication)
{
NSLog(@"Status is authenticated, fetching friends!!");
[self fetchGooglePlusFriends:kGTLPlusCollectionVisible];
}
else
{
[[GPPSignIn sharedInstance]authenticate];
}
I've defined the callback function one on initial signupviewcontroller and one under this one
-(void)finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error
{
//code
}
But whenever the else case executes it always calls the call back function defined on signupviewcontroller not the one I defined on friendsdisplayViewController hence I'm unable to display the list and but able to validate the authentication.
I'm just curious how the call to this google call back function (finishedWithAuth) is made. Why did it call the one in signup and not in friendsdisplay eventhough the authentication was triggered from friendsdisplay.