Error with facebook.

Are you changing the XXXXXXXXXXX’s in your build.settings to the value you get from setting up your app on Facebook?

Yes I did. I replaced the xxxxxxxx with my fb app id

Hi everyone,

While this thread may be long dead, and the old Facebook plugin is on its way out, I figure it’s time to put the nail in the coffin with this issue.

This error will occur in the event that a permission requested wasn’t granted!

In the source code for the old Facebook plugin, this can be seen in the FBSessionReauthorizeResultHandlers.

for ( int i = 0; i \< [publishPermissions count]; i++) { if ( ![publishSession.permissions containsObject:[publishPermissions objectAtIndex:i]] ) { release = true; publishError = [[NSError alloc] initWithDomain:@"com.facebook" code:123 userInfo:nil]; break; } }

This will also occur for read permissions that were requested and not granted.

This issue has been fixed in the Facebook-v4 plugin.

Hello I have a problem with FB v.4. on iOS 8 and iOS 9.

Below the LOG of the device + build.settings :

You can see the error message:

“canOpenURL: failed for URL”

“ERROR: network request failed:http://graph.facebook.com/10153850930699820/picture?type=normal [-1022: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.]”

Can you help me to solve this problem ?

Many Thanks

Feb  3 17:42:23 iPhone-di-Andrea kernel[0] <Notice>: xpcproxy[5936] Container: /private/var/mobile/Containers/Data/Application/5CF8721B-260E-430A-AC5C-C947B54A2D0F (sandbox)

Feb  3 17:42:24 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Platform: iPhone / iPhone6,2 / 9.2 / Apple A7 GPU / OpenGL ES 2.0 Apple A7 GPU - 75.11.5 / 2016.2803 / it-IT | IT | it_IT | it

Feb  3 17:42:24 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: iPhone 5

Feb  3 17:42:25 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Countly Initialized

Feb  3 17:42:25 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Countly Event Logged app_start

Feb  3 17:42:25 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Need to log in

Feb  3 17:42:27 iPhone-di-Andrea SpringBoard[2666] <Notice>: MIS: Using empty blacklist.

Feb  3 17:42:27 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Countly Response: {“result”:“Success”}

Feb  3 17:42:27 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Countly Response: {“result”:“Success”}

Feb  3 17:42:27 iPhone-di-Andrea Facebook[5864] <Warning>: -canOpenURL: failed for URL: “fb-ama://” - error: “(null)”

Feb  3 17:42:29 iPhone-di-Andrea mediaserverd[2249] <Warning>: 17:42:29.026 WARNING:  [0x16e12f000] 255: Sub_AudioSessionSetActiveWithFlags: WARNING translating CMSession error: -16980

Feb  3 17:42:29 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Error setting audio session active to 1! ‘!pla’

Feb  3 17:42:29 iPhone-di-Andrea SpringBoard[2666] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]

Feb  3 17:42:29 iPhone-di-Andrea SpringBoard[2666] <Notice>: MIS: Using empty blacklist.

Feb  3 17:42:30 iPhone-di-Andrea Facebook[5864] <Warning>: -canOpenURL: failed for URL: “fb183132138705616://authorize#e2e=%7B%22init%22%3A1454517745851%7D&granted_scopes=user_friends%2Cemail%2Ccontact_email%2Cpublic_profile&signed_request=507NuN1RSNJOTIPI7EwSe1uzJ_7pKJDRGSLFmZFRgIg.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUJodEs4dVQtU3FGb1F4MnNieWxZRVhEWkdneFM3bjFGbXhZLVU5VWhYZ2JxNHZLbnZYTlRhNzNya0x1T2w4eUIwelpucVNGaVVpYUIwbTBwX0E4X0V3THNVT1JqX2dTYnB6blJ5UElVRU5lb1M3cFk2bUJ4MnZlY21HUFhmQWhtZHcyZ1VnQVU4QlRLdVNsUXZlSFlobjRuNUFrZFRyLW9tT0VSSzBkUlJFXzdOT1ZnU1pIWWE3anVMYTl6WGhYcnVIMUlkOG5rSE1NaFBkeWhVMXlUbWF0YmgtNllFM3ZQbnItcVNmZWVIcDhKSmZLYUZuZEFLR1o1bmRDUlVnMXpiUHlxTWs4cTNFS2VrblF0aXRIUGVhZnpoNGRVQUtXcVg5U1ZxT2c0azN6c3I5Uy1qZU5La2dJa3BsYzNIMWhiSWNKcWRDSmtvckFpcHpqZGEzNi0wWiIsImlzc3VlZF9hdCI6MTQ1NDUxNzc0OSwidXNlcl9pZCI6IjEwMTUzODUwOTMwNjk5ODIwIn0&denied_scopes=&access_token=CAACmjsYTEtABAKhW1Jwwtuyot34IgenljZBT2s5d7eej1ZAcqEb3ZB6Xcj7u1hSS2gXnzRgeG7Su4D9AhZBnu1vKFpJlY3yUODXuvnIGaOzHddVvIzAPYVfNibQjRZAz8e2AK3ZAGNpKD6NOYevMpMEZCxpMifME0RgZCNF55x7kBuRZBsJGjLeDRRJ6PtBJvulqwczZCxhIZBsqDs2wCdmUZAtcebUmMKkH4WIZD&state=%7B%22challenge%22%3A%22ceQhOrqG%5C%2F395VS4NJqgUj2mUIkw%3D%22%2C%220_auth_logger_id%22%3A%22611FFC2D-D639-4660-A151-E9B948E3E65C%22%2C%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A0%7D&expires_in=5183687” - error: “This app is not allowed to query for scheme fb183132138705616”

Feb  3 17:42:31 iPhone-di-Andrea Facebook[5864] <Error>: [CoreBluetooth] API MISUSE: <CBCentralManager: 0x14dd23ae0> can only accept this command while in the powered on state

Feb  3 17:42:32 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: WARNING: timer.resume( timerId ) ignored b/c timerId was not paused.

Feb  3 17:42:33 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: cache path: /var/mobile/Containers/Data/Application/5CF8721B-260E-430A-AC5C-C947B54A2D0F/Library/Caches/vungle

Feb  3 17:42:33 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: luaopen_CoronaProvider_ads_admob

Feb  3 17:42:33 iPhone-di-Andrea SpringBoard[2666] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Feb  3 17:42:33 iPhone-di-Andrea SpringBoard[2666] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Feb  3 17:42:33 iPhone-di-Andrea duetexpertd[4353] <Warning>: mme: eu.makeitapp.hungrywolf, 2016-02-03 16:42:33 +0000, 

Feb  3 17:42:33 iPhone-di-Andrea SpringBoard[2666] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Feb  3 17:42:33 iPhone-di-Andrea SpringBoard[2666] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Feb  3 17:42:33 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: <Google> To get test ads on this device, call: request.testDevices = @[@“922f4c01f67a3f69456d9f96dcc9c51e”];

Feb  3 17:42:33 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: -canOpenURL: failed for URL: “kindle://home” - error: “This app is not allowed to query for scheme kindle”

Feb  3 17:42:34 iPhone-di-Andrea Bubble Magic World[5936] <Error>: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file.

Feb  3 17:42:34 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: ERROR: network request failed:http://graph.facebook.com/10153850930699820/picture?type=normal [-1022: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.]

Feb  3 17:42:34 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Invalid Parameter: URL argument was malformed URL

Feb  3 17:42:35 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: <Google:HTML> You are currently using version 6.12.2 of the SDK. Please consider updating your SDK to the most recent SDK version to get the latest features and bug fixes. The latest SDK can be downloaded from http://goo.gl/iGzfsP. A full list of release notes is available at https://developers.google.com/admob/ios/rel-notes.

Feb  3 17:42:48 iPhone-di-Andrea SpringBoard[2666] <Notice>: MIS: Using empty blacklist.

Feb  3 17:42:48 iPhone-di-Andrea SpringBoard[2666] <Warning>: SBLockScreenNotificationListController: Attempting to remove a bulletin I don’t have

Feb  3 17:42:48 iPhone-di-Andrea kernel[0] <Notice>: Sandbox: GmailHybrid(5784) deny(1) file-read-metadata /private/var/mobile/Containers/Shared/AppGroup/4A18B680-A937-4612-A06D-6AB2A4AD30BC/.com.apple.mobile_container_manager.metadata.plist

Feb  3 17:43:12 iPhone-di-Andrea Bubble Magic World[5936] <Warning>: Invalid Parameter: URL argument was malformed URL

settings = 

{

orientation = 

        {

            default = “portrait”,

        supported = { “portrait” },          

        },

    plugins =

    {

        – key is the name passed to Lua’s ‘require()’

        [“plugin.google.iap.v3”] =

        {

            – required

            publisherId = “com.coronalabs”,

supportedPlatforms = { [“android”] = true } 

        },

– This section is only required for builds > 2015.2668

[“plugin.facebook.v4”] =

{

publisherId = “com.coronalabs”,

},

        [“plugin.google.play.services”] =

        {

            publisherId = “com.coronalabs”

        },

[“CoronaProvider.ads.vungle”] =

        {

            publisherId = “com.vungle”,

        }, 

    },

android =

    {

        versionCode = “98”,

largeHeap = true,

    androidPermissions =

    {

                “android.permission.ACCESS_FINE_LOCATION”,

                “android.permission.INTERNET”,

                “android.permission.VIBRATE”,

           “android.permission.WRITE_EXTERNAL_STORAGE”,

    },

facebookAppId = “246988282173961”,

    permissions =

{

    {

    name = “.permission.C2D_MESSAGE”, 

    protectionLevel = “signature” 

    },

},

  

usesPermissions =

{

“android.permission.INTERNET”,

“android.permission.VIBRATE”,

“android.permission.GET_ACCOUNTS”,

“android.permission.RECEIVE_BOOT_COMPLETED”,

“com.google.android.c2dm.permission.RECEIVE”,

“.permission.C2D_MESSAGE”,

“com.android.vending.CHECK_LICENSE”,

“com.android.vending.BILLING”,

“android.permission.ACCESS_NETWORK_STATE”,

             “android.permission.WRITE_EXTERNAL_STORAGE”,

},

    },

iphone =

{

plist =

{

– For iOS 9+ only

NSAppTransportSecurity = 

{

NSAllowsArbitraryLoads = true,

NSExceptionDomains = 

{

[“fbcdn.net”] = 

{

NSIncludesSubdomains = true,

NSExceptionRequiresForwardSecrecy = false,

},

[“facebook.com”] = 

{

NSIncludesSubdomains = true,

NSExceptionRequiresForwardSecrecy = false,

},

[“akamaihd.net”] = 

{

NSIncludesSubdomains = true,

NSExceptionRequiresForwardSecrecy = false,

},

[“angrywolf.baas.makeitapp.eu”] = 

{

NSIncludesSubdomains = true,

NSThirdPartyExceptionAllowsInsecureHTTPLoads = true,

},

},

},

LSApplicationQueriesSchemes = 

{

“fb”,

“fbapi20130214”,

“fbapi20130410”,

“fbapi20140410”,

“fbapi20140116”,

“fbapi20150313”,

“fbapi20150629”,

“fbauth”,

“fbauth2”,

“fb-messenger-api20140430”,

},

UIAppFonts =

            {

“arialbd.ttf”,

“arial.ttf”,

“arial-narrow-bold-italic.ttf”,

            },

UIApplicationExitsOnSuspend = false,

UIPrerenderedIcon = true,

            UIStatusBarHidden = true,

            FacebookAppID = “246988282173961”,

–CFBundleShortVersionString = “4.6”,

            CFBundleURLTypes = {

                {

                CFBundleURLSchemes = { “fb246988282173961”, }

                }

            },

[“URL types”] = {

                item = {

                    [“URL Schemes”] =

                        { [“Item 0”] = “fb246988282173961” },  

                },

            },

       CFBundleIconFile = “Icon.png”,

       CFBundleIconFiles = {

“Icon.png”,

“Icon-167.png”,

“Icon-60@3x.png”,

“Icon-Small-40@3x.png”,

“Icon-Small@3x.png”,

“Icon@2x.png”,

“Icon-72.png”,

“Icon-72@2x.png”,

“Icon-Small-50.png”,

“Icon-Small-50@2x.png”,

“Icon-Small.png”,

“Icon-Small@2x.png”,

“Icon-Small-40.png”,

“Icon-Small-40@2x.png”,

“Icon-60.png”,

“Icon-60@2x.png”,

“Icon-76.png”,

“Icon-76@2x.png”,

“Icon-152.png”,

“Icon-152@2x.png”,

       },

UILaunchImages = 

{

                {  – iPhone 4 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 480}”

                },

                {  – iPhone 5 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default-568h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 568}”

                },

                {  – iPad Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default-Portrait”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{768, 1024}”

                },

                {  – iPhone 6 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-667h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{375, 667}”

                },

                {  – iPhone 6 Plus Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-736h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{414, 736}”

                },

                {  – iPad Pro Portrait

                    [“UILaunchImageMinimumOSVersion”] = “9.0”,

                    [“UILaunchImageName”] = “Default-Portrait-1336”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{1024, 1366}”

                },

            },

},

},

window =

{

titleText =

{

default = “Facebook”,

},

},

}

This sounds like an issue with your build.settings but if I’m being honest, it’s really hard to read. When posting code to the forums please use the blue <> button and paste your code in there. It will maintain the formatting from your editor.

Next, if your build.settings is formatted like that I would highly recommend that you revisit it and intent each nested table correctly. You should be able to visually line up each closing curly brace with the block that started it. Without it, its really hard to see if you missed putting something at the right level.

Rob

Hello Rob,

below I reposted the error and the build.settings.

Could you help me ?

Thanks.

(Where XXXXXXXXXXXXX is my FB APP ID)

Feb  9 15:10:51 iPhone-di-Andrea Facebook[1007] <Warning>: -canOpenURL: failed for URL: “fb183132138705616://authorize#e2e=%7B%22init%22%3A1455027043281%7D&granted_scopes=user_friends%2Cemail%2Ccontact_email%2Cpublic_profile&signed_request=AO2TbxF1zy8wSGi1VRDEyYknCNewm_ETPBnQ8lkxXbw.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUNnTjRrOGlLbkxjNkcxLXJzeks5THQ4aHNRUWFfbEJBUjhLTjBZQ2g3NlBia0lxdzk1blFPMDZaS0lteTg1Nm5FdDJfZ3NJTURzU3A3b1JvNWIxNjQ1QUhFaUc0QmdhdHI0c2t2ME1ib295NmRvU3dYRm1DVzVTd2NrNi1tNHowUzdEX0E2c2tFOEdWOU5mTzNMQTZ0Ym5JTkxLU1BNaG5oNmRfNXBqSXdLcVFSMEFraWg1ZTBGcDB3dzY5d0tlTjkwZ1FWZ0g2WXFPbVlxRTh2VWI5OEVaTWt0dnBQaUhUMGVoMEszWElESW45bklJLVFad1FKR2R0MUhoOWNzWUZreEFhMno5M25xV3VXeHhaVmNrSHNJQTlrOGV4Y282d1BaSFp6Um1tdG0yU3R1ZE1WcFFXckpMU2gwRkpqMkVSSS1taUcwZVBhaDRtQ0cxNzBsS2wxXyIsImlzc3VlZF9hdCI6MTQ1NTAyNzA1MSwidXNlcl9pZCI6IjEwMTUzODUwOTMwNjk5ODIwIn0&denied_scopes=&access_token=CAACmjsYTEtABAEsQXg1ZBaL8ZANIkMFdVdnUsC745dhF7ZCNuX7wnoRfW3a42UFvQKYDyj08iZByHPiy9FH7uIMOn5ar4JhtNwZAwjdVu6phZBoLAKc1QE7BDHcPjDTSEKYNuPEaD0gRDh6ytNk3bEHOelL2IO5iYUSAcZBYm2clTTGkDY5VcBjwzt4Xb5vkDP5R9kDXlgW5YfTYXnVpWWK19LBEeGGPXQZD&state=%7B%22challenge%22%3A%22z%5C%2FhQQuu5ZIRrMKRYuToWHul6dRc%3D%22%2C%220_auth_logger_id%22%3A%22562D62B2-B557-479C-AD82-61B19475B8F6%22%2C%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A0%7D&expires_in=5182856” - error: “This app is not allowed to query for scheme fbXXXXXXXXXXXXX”

Feb  9 15:10:51 iPhone-di-Andrea Bubble Magic World[1005] <Warning>: FBSDKLog: starting with Graph API v2.4, GET requests for /me should contain an explicit “fields” parameter

BUILD.SETTINGS

 iphone = { plist = { -- For iOS 9+ only NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, }, LSApplicationQueriesSchemes = { "fbapi", "fbapi20130214", "fbapi20130410", "fbapi20130702", "fbapi20131010", "fbapi20131219", "fbapi20140410", "fbapi20140116", "fbapi20150313", "fbapi20150629", "fbXXXXXXXXXXXXXX", "fbauth", "fbauth2", "fb-messenger-api20140430", }, UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, UIStatusBarHidden = true, FacebookAppID = "XXXXXXXXXXXXXX", CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX", } } }, ["URL types"] = { item = { ["URL Schemes"] = { ["Item 0"] = "fbXXXXXXXXXXXXXX" }, }, }, }, },

Are you changing the XXXXXXXXXXX’s in your build.settings to the value you get from setting up your app on Facebook?

Yes I did. I replaced the xxxxxxxx with my fb app id