Jaxl 没有使用示例做任何事情。 Facebook 聊天尝试
$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;
jaxl 日志中没有输出或显示任何内容。任何帮助将不胜感激。
$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;
Nothing is outputing or showing up in the jaxl log. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要创建日志文件并赋予其广泛的开放权限...
sudo touch /var/log/jaxl.log
<代码>
须藤 chmod 777 /var/log/jaxl.log
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