Facebook Invite Friendsプラグインを統合した後、初めてブラウザに読み込まれたときに正常に動作しますが、2回目に試してみるとまたは何か)それはちょうどもう開いていません。私はクリックし続けますが、開かないだけです。Facebook invite friendsプラグインが初めて初めて動作しない
これはコードです:
function showPopup(pageURL, title, w, h) {
var left = (screen.width/2) - (w/2);
var top = (screen.height/2) - (h/2);
var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
}
window.fbAsyncInit = function() {
FB.init({
// appId : 'my app id', // App ID
// channelURL : '//WWW.mydomain.COM/domainfolder/channel.php', // Channel File
status: true,
// check login status
cookie: true,
// enable cookies to allow the server to access the session
oauth: true,
// enable OAuth 2.0
xfbml: true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK asynchronously
(function (d) {
var js, id = 'facebook-jssdk';
if (d.getElementById(id)) {
return;
}
js = d.createElement('script');
js.id = id;
js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
//Replace the ALL_CAPS variables with your own values
function invite() {
FB.getLoginStatus(function (response) {
if (response.authResponse) {
// logged in and connected user, someone you know
FB.ui({
method: 'fbml.dialog',
width: '750px',
fbml: '<fb:request-form target="_self" method="post" invite="true" type="Invite" content="Hey! Come join me on this site! Finally it\'s opened for us! <fb:req-choice url=\'http://www.mysite.com/site/index.php\' label=\'Accept\' />" <fb:multi-friend-selector showborder="false" actiontext="Invite friends" email_invite="true" import_external_friends="true" /> </fb:request-form>'
});
} else {
// no user session available, someone you dont know
FB.login();
}
});
}
function loaded() {
document.getElementById('FBico').src = 'img/OtherServices/fb.png';
}
それはheadタグにあります。それは歴史をクリアした後、初めて完全に動作します。同じことは、インターネットエクスプローラ 9、Firefoxの8、ChromeとiPadのiOSの中で起こった5
のFacebookからall.jsファイルがどこかにキャッシュされ、再びロードしていないことがあります。コードの上にたった/html/body/
の小さなファイルが1つあり、常に完璧に動作します。
all.jsファイルをFacebookからキャッシュしないようにするにはどうすればよいですか?
あなたのページへのリンクはありますか? – Abby
nanjingnetwork.com/people.php – Sam