我有一个可以在一个网络上运行的代码,当我在另一个网络上尝试它时它不起作用。该代码应构建一个登录按钮,但该按钮未显示,因为似乎未发送应用程序 ID。编码:
<div id="fb-root"></div>
<?php
defined('_JEXEC') or die;
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$.ajaxSetup ({
cache: false
});
var ajax_load = "<img class='loading' src='http://fshf.org/images/loading.gif' alt='loading...' style='margin-left:261px; margin-top:40px' />";
</script>
<link href="modules/mod_facebook/tmpl/css/style.css" rel="stylesheet" type="text/css">
<script>
$(document).ready(function() {
$("#close").click(function(){
$("#erresira").remove();
$("#popup").remove();
});
$("body").prepend( "<div id='erresira'></div>" );
var window_h = $(window).height()/2;
var window_w = $(window).width()/2;
$("#popup").css({top:window_h,left:window_w});
$("#popup").animate({
left: "-=230px",
width: "+=460px",
top: "-=127px",
height: "+=254px"
}, 0 );
});
</script>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '205862336256764',
channelUrl : 'http://livebast.infoalbania.org/modules/mod_facebook/tmpl/channel.html',
status : true,
cookie : true,
xfbml : true
});
FB.Event.subscribe('auth.authResponseChange', function(response) {
if (response.status === 'connected') {
allowed();
} else if (response.status === 'not_authorized') {
FB.login();
} else {
FB.login();
}
});
};
(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));
function allowed() {
FB.getLoginStatus(function(response) {
var page_id = "184393808323569";
var user_id = response.authResponse.userID;
var uid = response.authResponse.userID;
var loadUrl = "http://livebast.infoalbania.org/modules/mod_facebook/tmpl/ajax.php";
$("#result").html(ajax_load).load(loadUrl+"?user_id=" + uid );
});
}
</script>
<div id="result"></div>
<div id="popup">
<div id="login"> <img src="<?=$params->get('image');?>" />
<p><strong>
<?=$params->get('content');?>
</strong></p>
<div id="appp">
<fb:login-button show-faces="true" width="230" max-rows="10"></fb:login-button>
</div>
<div id="like">
<fb:like href="https://www.facebook.com/LiveBast" width="330" show_faces="false" send="false"></fb:like>
</div>
</div>
<div id="close" class="close"></div>
</div>
第二页(代码不起作用的页面是:livebast.infoalbania.org 并且在 PLESK 服务器上)
这可能是子域配置错误的问题吗?