SLComposeController.setInitialText fails for Facebook when app present
Originator: | invalidname | ||
Number: | rdar://22443455 | Date Originated: | 8/26/15 |
Status: | dupe/20960895 | Resolved: | |
Product: | iOS SDK | Product Version: | 8.4.1 |
Classification: | UI/usability | Reproducible: | always |
Summary: Initial text provided to an SLComposeController of type SLServiceFacebook present in the compose controller only if the native Facebook app is *not* installed. If the app is present, the controller is empty. Steps to Reproduce: 1. Remove Facebook app if it is present 2. Run attached sample app (*) 3. Press "compose" 4. Notice that the text "This is the text I want to post" is pre-populated in the share sheet 5. Kill the app 6. Install Facebook app. Sign in to Facebook via the app. 7. Run attached sample app again 8. Press "compose" * - only interesting part of the sample app is this event-handler: @IBAction func handleComposeTapped(sender: AnyObject) { if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook) { let composer = SLComposeViewController(forServiceType: SLServiceTypeFacebook) composer.setInitialText("This is the text I want to post") presentViewController(composer, animated: true, completion: nil) } else { let alert = UIAlertController(title: "Can't post", message: "Composer not available", preferredStyle: .Alert) alert.addAction(UIAlertAction(title: "OK", style: .Cancel, handler: nil)) presentViewController(alert, animated: true, completion: nil) } } Expected Results: The test "This is the text I want to post" should be in the share sheet, as before Actual Results: The share sheet is empty Version: iOS 8.4.1 Notes: Apparently, this is a deliberate action by Facebook. See the discussion in a bug report here: https://developers.facebook.com/bugs/962985360399542/ Facebook's position is apparently that pre-populating a share sheet is against their developer polices, shown here: https://developers.facebook.com/docs/apps/review/prefill But HOLY CRAP ON A CRACKER, since when does Facebook get veto power over iOS system APIs?!! If they're really going to do this, it would be better for SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook) to return false, because the share sheet is completely useless in this scenario. Configuration: iPhone 5s, 64 GB, AT&T Attachments: 'FacebookComposeBuglet.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!