today I wanted to create a very simple php application to chat to facebook friends, but got strucked, I am using xmpphp for connecting to facebook chat. Below is the code I wrote.
<?php
require_once("libs/facebook/src/facebook.php");
require_once("informations/facebook_info.php");
$facebook=new Facebook($config_facebook);
if($facebook->getUser())
{
//now connect to facebook chat api
require_once('libs/xmpphp/xmpphp/xmpp.php');
$accesstoken=$facebook->getAccessToken();
$con=new XMPPHP_XMPP('chat.facebook.com',5222,'my-id@facebook.com',$accesstoken,'xmpphp','chat.facebook.com');
$con->useEncryption=false;
$con->connect();
}
else
{
header("location:index.php");
}
?>
But it is throwing me a warning saying:
Warning: fclose() expects parameter 1 to be resource, null given in C:\wamp\www\libs\xmpphp\xmpphp\XMLStream.php on line 405
Have I missed something?