Facebook身份验证API
我是facebook API的新手,我有一些关于facebook身份验证的问题。 我已经创建了一个应用程序,并编辑了域和url 网站域 giftme.web44.net 站点URL 我在我的网站网页上使用了以下内容:Facebook身份验证API,facebook,url,authentication,uri,Facebook,Url,Authentication,Uri,我是facebook API的新手,我有一些关于facebook身份验证的问题。 我已经创建了一个应用程序,并编辑了域和url 网站域 giftme.web44.net 站点URL 我在我的网站网页上使用了以下内容: <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : '3347207XXX
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '3347207XXXXXXXX', // App ID (I've replaced for security reasons)
channelUrl : 'http://giftme.web44.net/channel.html/', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
window.fbAsyninit=函数(){
FB.init({
appId:'3347207XXXXXXXX',//应用ID(出于安全原因,我已替换)
频道URL:'http://giftme.web44.net/channel.html/“,//通道文件
状态:true,//检查登录状态
cookie:true,//启用cookie以允许服务器访问会话
xfbml:true//解析xfbml
});
//这里有额外的初始化代码
};
//异步加载SDK
(职能(d){
var js,id='facebook jssdk',ref=d.getElementsByTagName('script')[0];
if(d.getElementById(id)){return;}
js=d.createElement('script');js.id=id;js.async=true;
js.src=“//connect.facebook.net/en_US/all.js”;
ref.parentNode.insertBefore(js,ref);
}(文件);
我创建的“channel.html”页面只有以下内容:
<script src="//connect.facebook.net/en_US/all.js"></script>
最后,我使用了登录按钮:
<div class="fb-login-button" >Login with Facebook</div>
使用Facebook登录
我做错了什么?
我不断地发现这个错误:
API错误代码:191
API错误描述:指定的URL不属于应用程序
错误消息:无效的重定向uri:URL信息为nãoépermitida pela configuraão do aplicativo
http://www.giftme.web44.net/
不等于http://giftme.web44.net/
重定向url必须包含应用程序属性中定义的站点url或画布url
例如:
https://api.facebook.com/method/admin.setAppProperties?
access_token=CURRENTTOKEN&
properties={'post_authorize_redirect_url':'http://giftme.web44.net/channel.html/'}
在哪里可以定义重定向url?在哪里可以找到重定向uri?还是我必须将其添加到脚本中?我需要设置画布url吗?