Facebook connect with iPhone not working?
Posted
by Atulkumar V. Jain
on Stack Overflow
See other posts from Stack Overflow
or by Atulkumar V. Jain
Published on 2010-05-19T06:07:31Z
Indexed on
2010/05/19
6:10 UTC
Read the original article
Hit count: 197
Hi Everybody,
I am trying to use Facebook connect in my application, but its not working as I desire. When I am trying to use the API Key and the API SecretKey of my application which I have registered with the facebook its not working. I have downloaded the code for the facebook. In the SessionViewController.m file when I pass my key values its not working. What I am trying to achieve is, when the app launches the first page is the Facebook Login Page. The user enters his username and password and then the next view should display. But nothing is happening, even the label doesn't display the username. Heres the code which I am using
- (void)request:(FBRequest*)request didLoad:(id)result {
NSArray* users = result;
NSDictionary* user = [users objectAtIndex:0];
NSString* name = [user objectForKey:@"name"];
_label.text = [NSString stringWithFormat:@"Logged in as %@",name];
NSLog(@"Username is :- %@",name);
FrontController *main = [[FrontController alloc] init];
[self.view addSubview:main.view];
[main release];
}
I am not able to figure out what is wrong with this code. When I try with some other key values such as the key for connect application its working fine.
Can anyone help me with this...
Thanx in advance...
© Stack Overflow or respective owner