Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Real-time Chat powered by Firebase

https://firechat.firebaseapp.com

License

NotificationsYou must be signed in to change notification settings

FirebaseExtended/firechat

Repository files navigation

Firechat is a simple, extensible chat widget powered byFirebase. It is intended to serve as a concise,documented foundation for chat products built on Firebase. It works out of the box, and is easilyextended.

Status

Status: Archived

This sample is no longer actively maintained and is left here for reference only.

Live Demo

Visitfirechat.firebaseapp.com to see a live demo of Firechat.

A screenshot of Jenny and Lexi the cat chatting on the Firechat demo

Setup

Firechat uses theFirebase Realtime Databaseas a backend, so it requires no server-side code. It can be added to any web app by including a fewJavaScript files:

<!-- jQuery --><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script><!-- Firebase --><scriptsrc="https://www.gstatic.com/firebasejs/3.3.0/firebase.js"></script><!-- Firechat --><linkrel="stylesheet"href="https://cdn.firebase.com/libs/firechat/3.0.1/firechat.min.css"/><scriptsrc="https://cdn.firebase.com/libs/firechat/3.0.1/firechat.min.js"></script>

giving your users a way to authenticate:

<script>functionlogin(){// Log the user in via Twittervarprovider=newfirebase.auth.TwitterAuthProvider();firebase.auth().signInWithPopup(provider).catch(function(error){console.log("Error authenticating user:",error);});}firebase.auth().onAuthStateChanged(function(user){// Once authenticated, instantiate Firechat with the logged in userif(user){initChat(user);}});</script><buttononclick="login()">Login with Twitter</button>

and initializing the chat:

<script>functioninitChat(user){// Get a Firebase Database refvarchatRef=firebase.database().ref("chat");// Create a Firechat instancevarchat=newFirechatUI(chatRef,document.getElementById("firechat-wrapper"));// Set the Firechat userchat.setUser(user.uid,user.displayName);}</script><divid="firechat-wrapper"></div>

For detailed integration instructions, see theFirechat documentation.

Getting Started with Firebase

Firechat requires Firebase in order to authenticate users and store data. You cansign up here for a free account.

Getting Help

If you have a question about Firechat, feel free to reach out through one of ourofficial support channels.

About

Real-time Chat powered by Firebase

https://firechat.firebaseapp.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors14


[8]ページ先頭

©2009-2025 Movatter.jp