hi i use the newest facebook api with SSO and do implement like following in my viewController (not in the appDelegate like in the example if that makes any difference):
in my .h file
Facebook *facebook;
@property (nonatomic,retain) Facebook *facebook;
in my .m file i do the following in my viewDidLoad
self.facebook = [[Facebook alloc] initWithAppId:@"myappID"];
in another method I do
if (![facebook isSessionValid]) {
NSArray *permissions = [[NSArray arrayWithObjects:@"publish_stream",nil] retain];
[facebook authorize:permissions delegate:self];
}
but it seems that isSessionValid is alway NO
and I don’t know why!
does anybody have any idea why ?
oh and also expirationDate and accessTokken are nil
alright here is the answer to my problem.
as I said in the comment also the application:handleOpenURL: never got called!
cause I had this method in my ViewController and apparently it has to be in the appDelegate!
so in my Navigationbar based application I did the following in my appDelegate:
in the .h file:
in the .m file:
and then implemented the method like that:
and of course in my ViewController I did everything @Tyler mentioned (thank you for that)
and everything works like a charm.
hope this helps everyone with the same problem.