My Account | Buy CometChat

documentation

Facebook/Gtalk/XMPP Extension

Using your own Facebook Application

If your site already uses Facebook to allow users to login, then you can use the same Facebook Application when your users connect via CometChat to chat with their Facebook friends.

Configuring your Facebook Application

  • Login to Facebook and go to your application in the developers section

  • Note the App ID and App Secret

Facebook app

  • Click on Edit Settings and update your App Domain to include chatforyoursite.com

  • Then update Mobile Web URL to http://chatforyoursite.com

Do not rename “chatforyoursite.com” to “chatforYOURACTUALSITENAME.com”. It is meant to be “chatforyoursite.com”, a domain that we own and use to enable Facebook chat.

facebook+app+1

  • Click on the Save Changes button and wait 3-10 minutes for the changes to propagate.

Configuring the extension

  1. In the Extensions section, add the Facebook/Gtalk/XMPP extension to your live extensions and click on the config link besides the name.

  2. Enter the details you noted previously

  3. Click on the Update Settings button and close the window

Facebook configuration

If you do not want the user to see the Facebook permissions dialog when logging into chat, add the following parameters in your Facebook Connect settings: offline_access, xmpp_login

Using your own Gtalk Application

Similar to facebook appplication, if your site already uses google to allow users to login, then you can use the same google Application when your users connect via CometChat to chat with their Gtalk friends.

Configuring your Gtalk Application

  • Login to Google and go to your application in the developers section ( for this point your browser to the following: https://code.google.com/apis/console/)

  • Note the Client ID and Client Secret

Gtalk configuration

  • Click on Edit Settings and update your App Domain to include chatforyoursite.com

  • Set Authorized Redirect URL to:
    http://j.chatforyoursite.com/gtalk.html
    https://j.chatforyoursite.com/gtalk.html

  • Then Set Authorized Javascript Origins to:
    http://j.chatforyoursite.com
    https://j.chatforyoursite.com

Google Settings

  • Click on the Save Changes button and wait 3-10 minutes for the changes to propagate.

Configuring the extension

  1. In the Extensions section, add the Facebook/Gtalk/XMPP extension to your live extensions and click on the config link besides the name.

  2. Enter the details you noted previously

  3. Click on the Update Settings button and close the window

Settings