Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Facebook Login "Given URL is not allowed by the Application configuration"

Believe me, I have read all the other questions on this topic. None of them solved my problem (or were even quite the same problem). Facebook login has been working perfectly fine for me for weeks... Until yesterday when suddenly it started breaking and giving me this error.

Before yesterday, when I logged into my app with the Facebook SDK logInWithReadPermissions method, it would say "You've already authorized [app name]!" and be perfectly happy to log me in and move on. Then suddenly it started failing with this error:

Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. To use this URL you must add a valid native platform in your App's settings.

The weird part is I hadn't changed any of the Facebook app's settings at all. This just suddenly started happening; five minutes before it worked, next build it didn't. Nevertheless, I looked up the error message and found a ton of things people suggested to do on the facebook developer page to fix the problem... Mostly involving the Valid OAuth redirect URIs field, not that I could quite get a clear answer of what you're supposed to put in there for an iOS app... They always said to put your website address. I don't have a website, I have an app... What gives?

So I knew I hadn't made any changes to the Facebook developer area to cause it to break, and I'd tried every change there that I could find on the internet. So I pulled down an old working copy to test that, on the off chance that somehow code I'd written was the problem. Nope; code from a week ago, that worked perfectly fine, still gives me the same message.

If the problem isn't in the code, and changing things on the FB site doesn't do it... I'm out of ideas. If there's something else I need to do on the FB app to fix this, suggest away and I'll give it a try... And if it works that's great, but I'm still not going to understand why it broke in the first place when I didn't make any changes... Anybody able to help me out?

like image 523
WendiKidd Avatar asked Aug 07 '15 17:08

WendiKidd


2 Answers

I had exactly the same issue. Actually you just have to add platform in your app settings

So here are the steps

  1. Open https://developers.facebook.com and select your app

  2. Settings > Basic > Add Platform

3.Now select iOS from the window and add your Bundle ID and rest of the information and click on Save changes enter image description here

and that's it. Hope it helps you .. All the best

like image 107
Kunal Gupta Avatar answered Oct 21 '22 07:10

Kunal Gupta


I had exactly the same issue today.

Same thing Facebook kept saying "You've already authorized [app name]!" in the past. Which I found strange since all my other apps didn't display this message.

In the end I figured that I didn't add an iOS platform for the Facebook app in Settings. I don't understand why it worked before :)

So try to add an iOS platform and don't forget to add your bundle ID.

I hope this works for you :)

like image 21
mloigeret Avatar answered Oct 21 '22 08:10

mloigeret