Hey, I'm back with some strange, mindtwisting questions.
Sorry if it's the wrong section.
I'm implementing a small social network and I would like people to be able to register using their own data from FB. I implemented the SSO described here:
Mobile Apps - Facebook Developers and I call the window that asks for permissions on a button click within my app.
The first question is: where is the user data stored? I have this facebook variable but I couldn't find an API where it's described how to access the information got from the FB login. Moreover, related to this, would it be possible to also have the password from FB shared within my app (same password for FB and my app without user typing it)?
The second question is, I have this code now:
Code:
- (IBAction) triggerFB{
NSArray* permissions = [[NSArray arrayWithObjects:
@"email", @"read_stream", nil] retain];
[facebook authorize:permissions delegate:self];
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [facebook handleOpenURL:url];
}
I don't understand where is the callback or how to call the callback function when the user accepts or rejects the ToS when the window is displayed. I would like to be able to fill out automatically the fields in the registration form if the user clicks on "Agree" (taking the data from the facebook variable), or let them empty if the user doesn't.
Thanks a lot,
Sorry again if it's the wrong section.