FB.Event.subscribe不适用于方法:'send'

时间:2012-06-19 19:51:30

标签: facebook

我正在使用FB.ui创建一个发送对话框...我试图在用户发送消息后收到回调,但由于某种原因它无法正常工作。

我尝试使用FB.event.subscribe

   FB.ui({                                                                                                                                                                   
     method: 'send',                                                                                                                                                         
     name: 'You\'re invited to join!',                                                                                                                          
     link: 'http://anexample.com',                                                                                                                                                              
   }); 

   FB.Event.subscribe('message.send',                                                                                                                                          
      function(response){                                                                                                                                                      
       alert('You sent a message from the URL ' + response);                                                                                                                                 
     }                                                                                                                                                                         
  );

有人能告诉我订阅有什么问题吗?发送工作正常。

1 个答案:

答案 0 :(得分:2)

使用以下回调:

FB.ui({ 
       method:'send',
       name: 'You\'re invited to join!',                                    
       link: 'http://anexample.com',
    },
    function(response) {
      //callback
    }
); 

您正在使用的回调是send按钮。