When i try to post to facebook within my app I get the error: Please Log In You need to be logged into the Facebook app to share this photo.
I am logged into the Facebook app as well as being logged in through the settings.
I have tested posting on the simulator and it works fine. When I test on my device is when I get the problem.
I have read some other posts about this issue. It was supposedly reported to Facebook already.
I was just wondering if other peoples facebook posting was working and if I can do anything special to correct my problem.
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]){
//Present twiter message box
SLComposeViewController *facebook = [[SLComposeViewController alloc] init];
facebook = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
//set the initial text for tweet
[facebook setInitialText:defaultPost];
[facebook addURL:[NSURL URLWithString:@"http://bit.do/flappyghost"]];
[facebook addImage:[UIImage imageNamed:@"appIcon.png"]];
//present viewcontroller
[self presentViewController:facebook animated:YES completion:nil];
} else {
//handle the error if twitter is not available
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"No Facebook Account is set up on this device!" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
}