我有一个网页,上面有一个按钮,邀请朋友到facebook上的粉丝页面,我显示邀请朋友弹出窗口,但如果我邀请朋友,他会收到我的应用程序的邀请,用于声明de FB js objetc,是可以的邀请朋友到facebook页面或其他网址? 我的网页不在Facebook上。 Y把我的代码:
`// CODE JS
window.fbAsyncInit = function () {
// init the FB JS SDK
FB.init({
appId: 'ID OF MY APP', // App ID from the App Dashboard
channelUrl: '', // Channel File for x-domain communication
status: true, // check the login status upon init?
cookie: true, // set sessions cookies to allow your server to access the session?
xfbml: true // parse XFBML tags on this page?
});
// Additional initialization code such as adding Event Listeners goes here
FB.Event.subscribe('edge.create', function (response) { alert('You liked the URL: ' + response); });
};
// Load the SDK's source Asynchronously
// Note that the debug version is being actively developed and might
// contain some type checks that are overly strict.
// Please report such bugs using the bugs tool.
(function (d, debug) {
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/es_LA/all" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ false));
function ListaAmigos() {
FB.ui({
method: 'apprequests',
message: 'Hello'
}, respuesta);
//FB.getLoginStatus(onFacebookInitialLoginStatus);
}`
感谢您的帮助,抱歉我的英语不好!!
答案 0 :(得分:0)
我用一个小技巧解决了这个问题,这个邀请重定向到我的Facebook应用程序,但是有一些参数,如果页面重新启动这个参数,我会重定向到粉丝专页