我想知道我是否写过我的频道网址。在JavaScript SDK参考https://developers.facebook.com/docs/reference/javascript/;在频道文件中的部分说:想知道我是否为facebook javascript sdk编写了频道url。
的channelUrl必须是一个完全合格的URL上 您包括SDK匹配的页面。换句话说,如果您的网站使用www来提供服务,并且您在网页上修改了 document.domain,则频道文件域 必须包含www,您必须在channel.html文件中制作相同的document.domain 更改。该协议还必须匹配 。如果您的页面通过https提供,则您的channelUrl也必须为 https。请记得使用脚本src的匹配协议作为 。
这是我的Javascript SDK页: 注:我放在同一文件夹中channel.html文件作为我的index.php文件,我不知道这是正确的要么。
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '278374582262040', // App ID
**channelUrl : 'localhost/controllers/index.php/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
});
//the rest of the sdk code