7
      $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-PLATFORM");  
    }  


        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.

Arian
  • 325
  • 1
  • 15
  • Hi Arian, Kindly pass logLevel=4 with Jaxl constructor to enable logging. Also error_reporting can be used for more verbose error if any related to ur php setup. – Abhinav Singh Apr 03 '11 at 22:39
  • Even with logLevel=>4 jaxl.log remains empty. – Arian Apr 04 '11 at 00:31
  • also i have error_reporting set to everything, even warnings. – Arian Apr 04 '11 at 00:32
  • how exactly are you running your application from command line? Also just after Jaxl initialization can you do var_dump($jaxl); to see if you are actually initializing everything properly. Also what php/jaxl version are you using? – Abhinav Singh Apr 04 '11 at 01:04
  • Hi! not from the command line. It's via hosted. – Arian Apr 04 '11 at 02:19
  • 1
    well then u shd make use of bosh or preFetch sample examples. Echobot or packaged fb app is a command line app and won't run from browser directly – Abhinav Singh Apr 04 '11 at 02:22
  • derp derp derp derp on me . Put that as an answer here and i'll up it. – Arian Apr 04 '11 at 02:30
  • 1
    It packages with Jaxl library... go inside /app directory and you will find two file preFetchXMPP.php and preFetchBOSH.php You can use one of them based on ur need.... – Abhinav Singh Apr 08 '11 at 01:07
  • Are theese $app_secret,$api_key set anywhere? – Harry Nov 25 '11 at 12:32

1 Answers1

1

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

mdpatrick
  • 1,082
  • 9
  • 12