简体   繁体   中英

FBLoginView in iphone app does not prompt to enter email address and password

I am using FBLoginView in my iphone app for login mechanism. Login and logout functionality is working as expected. For the first time when I click login, It asks for permission-"App would like to access your basic profile info etc. etc." I allow ok, it logs me in. The questions are:

-Why does it not ever prompt me to enter facebook username password? How does it know who to log me in as? I don't have facebook app even installed on my iphone. How does it manage to log me in correctly. Please help me if you know how this might be working.

Here is the code I have used: CGRect loginFrame=CGRectMake(MARGIN,currentFrame.size.height-LOGINBUTTONHEIGHT,50 , 20);//width, height don't matter FBLoginView1 = [[FBLoginView alloc] init]; FBLoginView1.readPermissions = @[@"email", @"basic_info", @"user_location", @"user_birthday", @"user_likes"];

FBLoginView1.frame = loginFrame;
FBLoginView1.delegate = self;//(id<FBLoginViewDelegate>)[theDelegate shopViewCtrl];
[[self view] addSubview:FBLoginView1];

[FBLoginView1 sizeToFit];

I have also implemented following functions: - (void)loginView:(FBLoginView *)loginView handleError:(NSError *)error - (void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id)user

Ok. So, I finally demystified it for myself. FBLoginView picks up username and password from "Settings" application on iphone. If I change the password on facebook, FBloginView error handler notifies me to go settings, tap on Facebook and then change password. Just posting the answer here if anyone else had this question and was wondering what was going on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM