Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook login issue - canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"

When I click on login with Facebook button, it is opening safari browser and getting closed immediately. Noticed error on the console.

App delegate method:

func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {     print("###### URL : ")     print(url)     print("###### App : ")     print(app)     print(options["UIApplicationOpenURLOptionsSourceApplicationKey"])     return FBSDKApplicationDelegate.sharedInstance().application(app, openURL: url,  sourceApplication: options["UIApplicationOpenURLOptionsSourceApplicationKey"] as! String,             annotation: nil) } 
 2015-09-18 18:37:51.410 [21036:5050465] -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"  2015-09-18 18:37:51.417[21036:5050465] -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"  ###### URL :   fb4554284912963222://authorize/?error_code=100&error_message=Invalid+Scope%3A+public&state=%7B%22challenge%22%3A%222ZmK6R5F05d%252F060TkCqj8SjPLjc%253D%22%2C%220_auth_logger_id%22%3A%223C79F2C8-61B9-470E-AE1B-E1C68435DB83%22%2C%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A%22sfvc_auth%22%7D&e2e=%7B%22init%22%3A145973.000512302%7D#_=_  ###### App :    Optional(com.apple.SafariViewService) nil  ###### err:  Optional(Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=100, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Invalid Scope: public, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=0}) 

IDE : xcode 7
Language : Swift2
Facebook SDK : 4.6.0
Parse: 1.8.4

I have also verified .plist is having all keys which are required. Also verified the bundle identifier for typo mistakes. All look good. Facebook is active.

Any help?

like image 819
sfbayman Avatar asked Sep 19 '15 02:09

sfbayman


1 Answers

I have the same warning, but in Facebook Docs there is an answer.

This is an Xcode warning indicating the the canOpenURL: call returned false. As long as you have configured the LSApplicationQueriesSchemes entry in your plist as described above, you can ignore this warning

https://developers.facebook.com/docs/ios/ios9

like image 78
EdoBen Avatar answered Oct 14 '22 00:10

EdoBen