Given URL is not allowed by the Application configuration.:...

0 votes

Hi, I am new for integrate my android mobile game with Facebook by using Unity. I am not understand how the mobile game connect with Facebook.  I faced the problem, Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. I also not understand about Valid OAuth redirect URLs. Hope someone can help me how to solve this problem. Thank you.

closed with the note: solved
asked Dec 14, 2014 in App42 Cloud API-BaaS by greenninjaad2013 (13 points)
closed Dec 16, 2014 by greenninjaad2013

2 Answers

0 votes
Hello,
 
This error occurs when you are mentioning the wrong redirect URL in your Facebook App while creating it. Please read our blog post how to integrate Facebook in unity App.
 
Let me know if it's helps.
answered Dec 14, 2014 by naresh (350 points)
Hi, Thank you for your reply. I have read that content~~ But I still facing that error. Actually I am don't know how I can get Valid OAuth redirect URLs. Is it need create by myself? Thank you.
+1 vote

Hello Green,

Kindly find the below steps to overcome on this issue: -

  • Login to your developers account of Facebook
  • Select your app - Click on settings >> Advance Setting of your app
  • Put this URL in Valid OAuth redirect URIs section & save
  • Run your app again

Let us know if it helps.

Himanshu Sharma

answered Dec 15, 2014 by hs00105 (2,005 points)
edited Dec 15, 2014 by hs00105
Hi, Thank you for your reply. URL that you provided overcome that issue. Every time I connect to Facebook, it will link the app to that page.If I want to login with Facebook or share something to Facebook, do I still need to use that URL?
This URL is used to get the access token from Facebook. Once your app got the access token, it can be used to share/post and get friends information using it. Once the access token is expired it will require to get it again using the same mechanism.

 
Let me know if you need further assistance regarding this.
Himanshu Sharma
Also requested you to close this thread if your query has been resolved.
Thanks,
Himanshu Sharma
Hi, thank you again for your reply. I had put the access token (user token) into the script, but still link to that page every time I pressed "Facebook Connect". I try with the Facebook-OAuth-For-Unity-master project available for download in internet.
If you don't want to connect Facebook at every time than you need to manage the user access token in local preference & check the local preference first when ever user open the app. If access token exist than check his information with that access token and login into the app else redirect into the login screen,
Let me know if it helps.
Thanks,
Himanshu Sharma
Hi, thank you for your reply. Is it possible that I back to my mobile game after I link to that page(browser:https://api.shephertz.com/facebook/OAuth/)? Because I tested in my smartphone, after I link to that page, I cannot proceed to the game scene.
You can simple press the back button for going back into the app.
Please check & let me if you need any other help.
Himanshu Sharma
Hi, it didn't work. Can you explain it more detail? Because I press on back button, it didn't back to app, but restart the app again. Thank you.
Hello Green,

If you are building an app only for Android, we will recommend you to use the below plugin which will be used for Facebook Authorization.

https://github.com/VishnuGShephertz/Facebook-Unity-library

Please check & let us know if it helps.
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...