iOS - Facebook Login Error - Unknown Error building URL (com.facebook.sdk.core error 3) -


i using facebook login ios app being developed ios 8 , onwards. (latest facebook sdk being used)

i have followed essential steps described facebook official guide. however, when click login button gives me following error:

unknown error building url (com.facebook.sdk.core error 3)

i have checked, might have done wrong, seems per guide, , have been stuck here day.

code fb login delegate:

class fblogindelegate: nsobject,  fbsdkloginbuttondelegate  {   func loginbutton(loginbutton: fbsdkloginbutton!, didcompletewithresult result: fbsdkloginmanagerloginresult!, error: nserror!){     if(error == nil){         print("logged in btn")     }else{         print("error: \(error.localizeddescription)") //here gives error      }  } } 

code fb login button:

      var fbloginbtndelegate = fblogindelegate()     let fbbtnwidth = self.view.bounds.width - (self.fbcontainerleftconstraint.constant + self.fbcontainerrightconstraint.constant)     let fbloginbutton = fbsdkloginbutton(frame: cgrectmake(0,0,fbbtnwidth,self.fbbuttoncontainer.bounds.size.height))      self.fbbuttoncontainer.addsubview(fbloginbutton)     fbloginbutton.readpermissions = ["public_profile", "user_friends", "email", "user_birthday"]     fbloginbutton.delegate = fbloginbtndelegate 

for me, problem facebook app id indicated in cfbundleurltypes > cfbundleurlschemes in info.plist spelled out incorrectly.

i importing app id .xcconfig file underlying value changes depending on whether i'm running debug or release scheme. however, when printed out plist file, there unnecessary quotation marks around app id when read xcconfig files. example, url scheme should fb012345678, fb"012345678".

i tried hardcoding app ids correctly info.plist stated in facebook guide, , fbsdkloginbutton worked. safari came display facebook login screen. don't have hardcode ids though--just make sure substituted correctly in info.plist.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -