0

Anyone else getting this error:

Error Domain=WebKitErrorDomain Code=101 "The operation couldn’t be completed. (WebKitErrorDomain error 101.)"

when using:

FBWebDialogs.presentDialogModallyWithSession(nil, dialog: "Share this", parameters: ["Sharing Tutorial": "name", "Build Great app": "Caption", "Users to share": "description", "http://google.ca":"link", "http://i.forbesimg.com/media/lists/companies/google_416x416.jpg": "picture"], handler: {
                result, resultURL, error in
                if (error != nil){
                    println("error publishing \(error.description)")
                } else {
                    if (result == FBWebDialogResult.DialogNotCompleted){
                        println("user cancelled")
                    } else {
                        println("very good job")
                    }
                }

Not really sure why this is happening. Any help is greatly appreciated! Thanks SO

John D
  • 1,435
  • 2
  • 16
  • 24
  • Error shows that there is an invalid url which can not handle http://stackoverflow.com/questions/5194813/webkiterrordomain-error-101 – Jageen Jan 30 '15 at 05:15

1 Answers1

0

In swift, doesn't the key come first? So your parameter dictionary is backwards.

["name": "Sharing Tutorial", "caption": "Build Great app", "description": "Users to share", "link": "http://google.ca", "picture": "http://i.forbesimg.com/media/lists/companies/google_416x416.jpg"]
Ming Li
  • 15,672
  • 3
  • 37
  • 35