Open lcyabcd opened 9 years ago
Is this code in your page? The process running JAXL will keep running until you tell JAXL to stop. That's why the page appears to be loading and loading and loading.
If you want to have an XMPP client on a web page, you need to use a BOSH client - something like what is described at http://abhinavsingh.com/jaxl-bosh-demo-im-chat-client-for-all-wordpress-blogs/ - though I don't see all of the code I am expecting to see.
@lcyabcd You probably want to close the client connection once it has sent out the message. Example, adding $client->send_end_stream()
after $client->send($stanza)
will terminate the client after it sends out the 1st message.
I want to have a web client.
I am implementing the Facebook Chat into my site so I used JAXL in order to implement the XMPP. It seems that the script posts the message that I wanted, but whenever I run it, the page just keeps loading and loading and never stops. In order to get back onto that site, I have to clear the cookies for it in my browser. Not sure what the problem could be, I am not seeing any errors in my log. Take a look at the code: Thanks!
$client = new JAXL(array( 'jid' => $user['facebookID']."@chat.facebook.com", 'fb_app_key' => "XXXX", 'fb_access_token' => $user['facebook_access_token'], 'force_tls' => true, 'auth_type' => 'X-FACEBOOK-PLATFORM', 'log_level' => JAXL_INFO, 'priv_dir' => "includes/lib/jaxl/tmp" ));