ios - How to detect user successfully shared to Facebook with SLComposeViewController -


i created button in app share status on facebook slcomposeviewcontroller. how check whether user click share status?

my code below:

@ibaction func fbbtn(_ sender: any) {      if slcomposeviewcontroller.isavailable(forservicetype: slservicetypefacebook) {         let fbshare:slcomposeviewcontroller = slcomposeviewcontroller(forservicetype: slservicetypefacebook)          self.present(fbshare, animated: true, completion: nil)      } else {         let alert = uialertcontroller(title: "accounts", message: "please login facebook account share.", preferredstyle: uialertcontrollerstyle.alert)          alert.addaction(uialertaction(title: "ok", style: uialertactionstyle.default, handler: nil))         self.present(alert, animated: true, completion: nil)     } }  

problem solved tq

fbshare.completionhandler = { (result:slcomposeviewcontrollerresult) -> void in             switch result {             case slcomposeviewcontrollerresult.cancelled:                 print("cancelled")                  break              case slcomposeviewcontrollerresult.done:                 print("done")                 break             }         } 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -