2
當我嘗試發佈到Facebook我的應用程序中我得到的錯誤:請登錄您需要登錄到Facebook的應用程序分享這張照片。發佈至Facebook的問題使用SLComposeViewController
我登錄到Facebook的應用程序以及通過設置被登錄。
我已經在模擬器上測試發帖,它工作正常。當我在我的設備上測試時出現問題時。
我看了一下這個問題的一些其他職位。據說已經向Facebook報告。
我只是,不知道是否有其他民族的Facebook張貼在工作,如果我可以做什麼特別的糾正我的問題。
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];
}