I am Creating a App in which I implemented FB login. So i write a FBLogin button code in my ViewDidLoad in ViewController.m file.
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init];
loginButton.center = self.view.center;
[self.view addSubview:loginButton];
}
but when i ran this code. fb buttons appears in all pages of my app, it means my viewController.m ViewDidLoad method call every time.Why? I am looking for solution last 4 hours but didnt get any result yet. please help me out.