2013-03-06 89 views
0

我有一个带有按钮的网页,邀请朋友到Facebook上的粉丝页面,我显示邀请好友弹出窗口,但是如果我邀请他的朋友,他会邀请我的应用用于申报FB js objetc,可以邀请朋友加入Facebook页面或其他网址吗? 我的网页不在脸书上。 Ÿ把我的代码:邀请好友加入粉丝页面

`// 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

我用一个小技巧解决了这个问题,这个邀请重定向到我的Facebook应用程序,但有一些参数,如果页面收到这个参数我重定向到粉丝页