My code worked fine on iOS 10, but after upgrading to iOS 11 nothing works.
This is my code. To share videos on facebook:
internal func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]){
self.dismiss(animated: true, completion: { () -> Void in
})
guard let videoURL = info[UIImagePickerControllerReferenceURL] as? NSURL else {
return
}
print(videoURL)
let video = Video(url: videoURL as URL)
var content = VideoShareContent(video: video)
content.hashtag = Hashtag.init("#Ojas")
if FBSDKAccessToken.current() != nil{
if FBSDKAccessToken.current().hasGranted("publish_actions") {
print("Have permission")
let sharer = GraphSharer(content: content)
sharer.failsOnInvalidData = true
sharer.message = "From #Ojas App"
sharer.completion = { result in
print("Share results : \(result)")
}
do{
try sharer.share()
}catch{
print("Facebook share error")
}
}
}
But nothing works as before. Here is the log I see for ImagePicker:
[discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}
And now a warning appears "app_name" wants to use "facebook.com" to Sign in
. Links I said:
PhotoPicker detection error: Domain error = PlugInKit code = 13
Any idea why everything stopped working for iOS 11. Any help would be appreciated.
source
share