I tried doing [FBSDKAccessToken setCurrentAccessToken:nil];
[FBSDKProfile setCurrentProfile:nil];
even after doing this and after running the application, I entered different credential to login to Facebook app, but it is still taking the previously entered credentials. So my question is how to clear or delete the credentials. Please someone help me in doing this. Thanks in advance for spending your time to go through this question and answering.
Asked
Active
Viewed 1,682 times
3

Rohit Khandelwal
- 1,778
- 15
- 23

Sanjay H R
- 33
- 5
-
you can use code formatting to highlight the code – Chaitanya K Apr 20 '16 at 11:40
2 Answers
1
try this
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me/permissions/"
parameters:nil
HTTPMethod:@"DELETE"]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
// ...
}];
there after add your facebook login code
for additional information see this
or choice -2
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
if ( [FBSDKAccessToken currentAccessToken] ){
[login logOut];
[FBSDKAccessToken setCurrentAccessToken:nil];
[FBSDKProfile setCurrentProfile:nil];
}

Community
- 1
- 1

Anbu.Karthik
- 82,064
- 23
- 174
- 143
0
Yes, it will be because it took the cookies from the Safari browser.
Go to your Xcode --> Product --> clean --> and run it
or
Uninstall the app and go to Safari browser in your iPhone, hit the facebook.com if it's already signed in, hit log out, then run your application.
-
-
Bro am saying it in device only, go to safari browser in your device and do the else part that i have posted above. – Vignesh Apr 20 '16 at 12:06