I've implemented a Facebook post function in my app, where you can post the coordinates of your location on Facebook. It works fine in the iOS simulator, but when I try it on a real device (iPhone 5S) the post-box is empty and the post button is greyed out. Any ideas?
Here's my code:
SLComposeViewController *controllerFB = [[SLComposeViewController alloc] init];
controllerFB = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
NSString *theLocation = [NSString stringWithFormat:@"%f,%f", self.locationManager.location.coordinate.latitude, self.locationManager.location.coordinate.longitude];
[controllerFB setInitialText: theLocation];
[self presentViewController:controllerFB animated:YES completion:NULL];
尝试在iPhone上的“设置”应用中登录Facebook
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.