I followed this tutorial on installing FBConnect in an application. I know it is slightly outdated and there are newer ones, but all I need FB for in my app is very simple post to wall commands, so this one is the one I used. Not to sound harsh but I'm not interested in a completely different way of doing it, just debugging the problem I have.
I follow the tutorial to the letter, set everything up in my .h file, link everything correctly in IB. Here is the line of code that is giving me fits.
Here is the issue. My app is TabBar and on each tab is a different blog or webpage. Therefore, I have this code in every ViewController, each with a different PosttoWall void statement to fit what is in the ViewController. The tutorial I listed says to leave
as this
If I then run this code, it will have me log in to facebook, then say redirecting, but never pop up the publish story to wall window. If I leave it
the first Viewcontroller will work perfectly, but all the other tabs viewcontrollers will terminate after logging in, with an error of _session key returning nil. How can I fix it where when I click and login it will automatically pull the Publish Story to Wall window?
To moderator:
Please delete prior thread of Strangest problem, and leave this open. I believe this better explains the issue. Thank you.
I follow the tutorial to the letter, set everything up in my .h file, link everything correctly in IB. Here is the line of code that is giving me fits.
Code:
- (IBAction) posttowall {
_posting = YES;
// If we're not logged in, log in first...
if (![_session isConnected]) {
self.loginDialog = nil;
_loginDialog = [[FBLoginDialog alloc] initWithSession:_session];
[_loginDialog show];
}
// If we have a session and a name, post to the wall!
else if (_facebookName != nil) {
[self postToWall];
}
}
Code:
_loginDialog = [[FBLoginDialog alloc] initWithSession:_session];
Code:
_loginDialog = [[FBLoginDialog alloc] init];
Code:
_loginDialog = [[FBLoginDialog alloc] initWithSession:_session];
To moderator:
Please delete prior thread of Strangest problem, and leave this open. I believe this better explains the issue. Thank you.