English 中文(简体)
Facebook OAuth redirect_uri problem Given URL is not permitted by the application configuration.
原标题:

When asking for authorisation by redirecting to the following url:

https://graph.facebook.com/oauth/authorize?client_id=...&scope=email,offline_access&redirect_uri=http%3A%2F%2Flocalhost%2Flogin%2Findex.php%3Fcallback%3Dfacebook

Facebook returns Invalid redirect_uri Given URL is not permitted by the application configuration.

Possibly because my application is registered with http://syncacity.com on the application configuration. But still, twitter allows me to redirect to any url, so why is facebook whining?

I d appreciate your thoughts :)

最佳回答

why not just edit your hosts file and point your domain to your local ip then you only need to switch the dev box hosts before doing anything.

问题回答

Change your application url to http://localhost while you develop and then to your site once it s in production. :)

it got resolved - thanks to one of the Facebook platform developers.

Let s say your local site URL is http://localhost:8000 You will need to add http://localhost:8000 to the Facebook App setting at "Settings -> Basic -> Website->Site URL."

Following worked for me:

App Domains: localhost
Site URL: http://localhost

enter image description here

I create a test app in sandbox mode (advanced settings) then integrate to that for development and test

You have defined localhost url in redirect_url (redirect_uri=http://localhost/login/index.php ..) I m not familiar with OAuth but that might be the problem.





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签