开发者

Jaxl not doing anything using example. Facebook Chat attempt

      $jaxl = new JAXL(array(  
            'user'=>'akooshesh@chat.facebook.com',  
            'pass'=>'', // Not required, we will use user session key instead  
            'host'=>'chat.facebook.com',  
            'domain'=>'chat.facebook.com'  
    ));  
            function getFacebookKey() {
            global $session;
              global $app_secret,$api_key;
                            return array(  
                                    $app_secret, // Your application secret key  
                                    $api_key, // Your application api key  
                                    $session['session_key'] // Connecting user session key  
                            );  
                    }  


            function doAuth($mechanism) {  
            global $jaxl;  
            $jaxl->auth("X-FACEBOOK-P开发者_开发技巧LATFORM");  
    }  


        function postAuth($payload, $jaxl) {
            var_dump($jaxl);
            $jaxl->sendMessage('arian.kooshesh@chat.facebook.com', 'what up');


        }

// Register callback on required hook (callback'd method will always receive 2 params)
$jaxl->addPlugin('jaxl_post_auth', 'postAuth');

$jaxl->addPlugin('jaxl_get_facebook_key', 'getFacebookKey');
// Start Jaxl core
$jaxl->startCore('stream');

    exit;

Nothing is outputing or showing up in the jaxl log. Any help would be greatly appreciated.


You may need to create the log file and given it wide open permissions...

sudo touch /var/log/jaxl.log

sudo chmod 777 /var/log/jaxl.log

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜