$jaxl = new JAXL(array(
            'user'=>'[email protected]',
            '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-PLATFORM");
    }


        function postAuth($payload, $jaxl) {
            var_dump($jaxl);
            $jaxl->sendMessage('[email protected]', '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;
jail 日志中没有任何输出或显示。任何帮助将不胜感激。

最佳答案

您可能需要创建日志文件并赋予其广泛的打开权限...
sudo touch /var/log/jaxl.logsudo chmod 777 /var/log/jaxl.log

10-05 20:29