No video

Realtime Web based Chat in Firebase - Javascript

  Рет қаралды 212,300

Adnan Afzal

Adnan Afzal

Күн бұрын

Realtime Web-based Chat in Firebase - Javascript
- Add a child in an array
- Get all children as an array
- Get a single child using a unique ID
- Delete child using dynamic ID
- Receive event when new child added
- Receive event when a child is removed
- One HTML & CSS template is integrated into the chat but you can integrate ANY template of your choice without breaking the functionality
Source code:
adnan-tech.com...

Пікірлер: 587
@JayAyers
@JayAyers 3 жыл бұрын
Brilliant! This will help me a ton. I've been on the fence with Firebase but it looks very manageable.
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thank you.
@antoniofuller2331
@antoniofuller2331 2 жыл бұрын
Fence-sitter lad, sad
@SamadKanton
@SamadKanton 2 жыл бұрын
sure!
@arthbhalodiya
@arthbhalodiya 3 жыл бұрын
Thank you so much Sir!!! for this Guide No Words to Say... Love From India
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You're welcome :)
@user-jp7fj7xi2y
@user-jp7fj7xi2y 3 жыл бұрын
Hi, were you able to make it right? There is no "Database" option in the Build section on the left side in the firebase, instead, there is "Real-time Database". Can you help?
@arthbhalodiya
@arthbhalodiya 3 жыл бұрын
@@user-jp7fj7xi2y Yes, Real-time Database
@CarlosGonzalez-yc1pk
@CarlosGonzalez-yc1pk 3 жыл бұрын
How the heck is this not more popular? Thank you!
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You are welcome.
@spirals1310
@spirals1310 3 жыл бұрын
I-I am speechless. This helped me so much! Thank you! I always wanted to learn this!
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thank you so much.
@astitvagamerz3131
@astitvagamerz3131 3 жыл бұрын
😭😭😭👍❤️❤️
@astitvagamerz3131
@astitvagamerz3131 3 жыл бұрын
I can feel the coders heart
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
@@astitvagamerz3131 Thank you so much.
@adityapundir6529
@adityapundir6529 3 жыл бұрын
Bro this is the best tutorial I have ever seen for making a chat app and it worked amazing for me. Thanks a lot!!!
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You’re welcome.
@mimotaken
@mimotaken 2 жыл бұрын
I ReWatch Your vids Until I Learned The Entire code
@ThrillDaWill
@ThrillDaWill Жыл бұрын
At 5:08 where you recieve a message on firebase, I do not get that, instead, my page refreshes and prompts me to input my name again.
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Enable “preserve log” in console tab and see what error is there.
@ThrillDaWill
@ThrillDaWill Жыл бұрын
@@AdnanAfzal565 Uncaught ReferenceError: firebase is not defined
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Make sure to create a firebase object first.
@ThrillDaWill
@ThrillDaWill Жыл бұрын
@@AdnanAfzal565 do you think you could make an updated version? i would really appreciate it! These kind of smalls projects really help out when trying to learning.
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Updated version with new features ?
@delaplaces7130
@delaplaces7130 Жыл бұрын
no talking yet the best chat app tutorial I have ever seen, thanks alot bro
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
You are welcome ❤️
@AKUKamil
@AKUKamil 3 жыл бұрын
just amazing. How clear code can be even without voice
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thanks.
@simonrileyofficial
@simonrileyofficial Ай бұрын
i didnt use to write comments.. but you deserve that, you are awesome man. after 3 years from publishing the video i have to tell you god job😍
@AdnanAfzal565
@AdnanAfzal565 Ай бұрын
Thank you ❤️ glad to hear that.
@colinellingham9631
@colinellingham9631 2 жыл бұрын
what a video!! most useful coding video ive watched in a while!
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Thank you. Glad to hear it.
@hanam6138
@hanam6138 4 жыл бұрын
thank you very much for posting this to sharing anyone who in stuck, very thank
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
You're welcome!
@flo8724
@flo8724 3 жыл бұрын
Thank you for this video! It's amazing, even without sound! One question : isn't it insecure to use Javascript? Everyone can edit the code and have access to the firestore.....
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You can use firebase “rules” aur “authentication” features. You can read in detail from their upto-date documentation.
@Martin958
@Martin958 3 жыл бұрын
@@AdnanAfzal565 I'm at a complete loss as to how anyone can use XAMPP or VSC with Firebase. Surely they cannot access anything outside of the localhost itself? They are offline. Have I missed something here?
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
They can build the project offline using localhost. When the project is deployed on hosting, then the firebase will remain same.
@Martin958
@Martin958 3 жыл бұрын
@@AdnanAfzal565 So they have to transfer their client side files to Firebase? I thought it was just a back end service.
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
No, you have to transfer files on hosting server like a2hosting, hostgator etc.
@danieltk999
@danieltk999 4 жыл бұрын
Thanks a lot Man............Please Upload such videos often....you are so awesome....Keep Up The Good Work !!!!!!
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Thank you, I will
@blazi_0
@blazi_0 3 жыл бұрын
I don't know what does the backend people do if I can do all this work using front-end 🤔 When I started learning front-end development I didn't expect that I will build a simple chat app like this with few lines of code ! Impressive 👍
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Exactly!
@SalmanShah95
@SalmanShah95 2 жыл бұрын
Also add voice so it will be more cool video 😎
@bestdivision
@bestdivision 4 жыл бұрын
Wow, that's what I was looking for very long time...Many many thanks!!
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
You’re welcome. Glad it helped.
@bestdivision
@bestdivision 4 жыл бұрын
@@AdnanAfzal565 Keep it up bro. Your almost all video are practical... And its very useful. Thank you once again..
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Thank you very much. Feel free to contact us if you face any problem in your programming project: adnan-tech.com/contact-us/
@bestdivision
@bestdivision 4 жыл бұрын
@@AdnanAfzal565 Yeah sure...I'll contact you.. It would be my pleasure...
@franciscogonzalez353
@franciscogonzalez353 3 жыл бұрын
Thanks You , from Chile
@user-jp7fj7xi2y
@user-jp7fj7xi2y 3 жыл бұрын
Hi, were you able to make it right? There is no "Database" option in the Build section on the left side in the firebase, instead, there is "Real-time Database". Can you help?
@rudrasurati
@rudrasurati 3 жыл бұрын
hey bro.. dont hv words to thank you.. this is so much help for my final project. i didnt hv any clue to how to get this done. thanks to u man I did it. thank you so much brother...
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You're welcome.
@lemonyth
@lemonyth 2 жыл бұрын
- "what was that?" - "great"
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Thanks.
@Captainpricegoingdark
@Captainpricegoingdark 3 жыл бұрын
Thank you bro, love from India😊
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You sre welcome.
@anonymoustv8604
@anonymoustv8604 3 жыл бұрын
Thanks man...You're the real MVP
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thanks.
@developer_hadi
@developer_hadi 2 жыл бұрын
WHY ONLY 2.6K LIKES? THIS SHOULD GET 1M VIEWS AT LEAST
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Thanks.
@eugineakediodongo2832
@eugineakediodongo2832 2 жыл бұрын
Kickstarted my project!
@mobgaming292
@mobgaming292 4 жыл бұрын
Awesome Video brother
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Thanks.
@ahmetaltun2430
@ahmetaltun2430 4 жыл бұрын
Adnan, very thanks
@outliners2244
@outliners2244 3 жыл бұрын
you have done really a great job with your help i can not develop my own firebase cloud database applications thanks buddy
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You're welcome.
@cedric6941
@cedric6941 2 жыл бұрын
Can you do CSS tutorial for it? I really liked the Animation when you sent a message
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
The CSS code is in the source files. But as I am a backend developer, it would be difficult for me to do the CSS :(
@cedric6941
@cedric6941 2 жыл бұрын
@@AdnanAfzal565 okay, thank you for a quick reply!
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
No problem.
@cedric6941
@cedric6941 2 жыл бұрын
@@AdnanAfzal565 also you made it a php file, can it be a html file instead?
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Yes
@snfilms6946
@snfilms6946 3 жыл бұрын
Thank you so much!!! You're the best!!
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thank you. And you are welcome.
@riteshbaranwal745
@riteshbaranwal745 3 жыл бұрын
Very helpful content sir thank you so much!!!!!!!!!!
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You are welcome.
@TaleWhaleTV
@TaleWhaleTV 4 жыл бұрын
Hi Bro .. You tutorials are great but there is one problem ... I have followed and finished the coding but I am unable to understand how to open the .php files in a browser . How to open the file index.php in browser such as google?
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
If you are using xampp then place your files in htdocs folder and access in browser like: Localhost/folder_name
@CristianRomero-up1nj
@CristianRomero-up1nj 3 жыл бұрын
epic. soberbio. tres bon!!!
@AlvinPdn
@AlvinPdn 3 жыл бұрын
Thank you very much sir! This is very useful!
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You are welcome.
@baridaniel5773
@baridaniel5773 3 жыл бұрын
You save me, thanks
@PiyushSharma-od2el
@PiyushSharma-od2el 3 жыл бұрын
Thankyou so much bro, its so helpful, love from india
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You are welcome.
@PiyushSharma-od2el
@PiyushSharma-od2el 3 жыл бұрын
@@AdnanAfzal565 Can you help me im very basic at this , so i create php file and then now i want to design it by using html so how i can do that
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Process is same. Simply follow the tutorial, write the code in it, and it will work in your php file as well.
@PiyushSharma-od2el
@PiyushSharma-od2el 3 жыл бұрын
@@AdnanAfzal565 Thankyou
@tusharmachhi5953
@tusharmachhi5953 4 жыл бұрын
I need html css tamplet
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
You can get it from here: adnan-tech.com/realtime-web-based-chat-in-firebase/
@littlethz
@littlethz 3 жыл бұрын
you got it ?
@anandrana6536
@anandrana6536 Жыл бұрын
Uncaught ReferenceError: firebase is not defined at testdata(function name)
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Make sure firebase JS files are included before.
@user-13-g9h
@user-13-g9h 3 жыл бұрын
man that's very cool, thanks
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thank you.
@mohammedzubair2065
@mohammedzubair2065 3 жыл бұрын
Sukraan bhiya aap clearly explain kara
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You’re welcome.
@maddex6664
@maddex6664 2 жыл бұрын
wow nice i am going to try it i am newbie
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
sure, thank you.
@thesingularity6111
@thesingularity6111 2 жыл бұрын
FIREBASE FATAL ERROR: Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp(). How can i solve this please help
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
You need to enter the database URL there, like this step: kzfaq.info/get/bejne/ebFii6iqu63HZpc.html
@zahid1638
@zahid1638 2 жыл бұрын
Hey bro! Thanks it really helps me...I have a problem can you plz tell me how can I add the *time* as shown in the preview... although great work!🙌
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
You can save the time using new Date().getTime().
@zahid1638
@zahid1638 2 жыл бұрын
@@AdnanAfzal565 sir, have you made any separate video on this topic...if yes plz link it hear...it will really help he out ✨thank you!
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
@@zahid1638 No sorry, but you can simply store the time in database and display it like other fields in this tutorial.
@zahid1638
@zahid1638 2 жыл бұрын
@@AdnanAfzal565 ohk I got it...thanks for your response! :)
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
@@zahid1638 you are welcome.
@kasim393
@kasim393 3 жыл бұрын
Best thing is there is no music.
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thanks.
@zyrenth
@zyrenth 3 жыл бұрын
big thanks, this is a very good video!
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You’re welcome.
@sehayasartvilla6112
@sehayasartvilla6112 3 жыл бұрын
its really helpfull Thankyou sooo much
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You're welcome.
@MojtabaParsa2000
@MojtabaParsa2000 2 жыл бұрын
The SDK has been upgraded. I am able to store in the database based on another code that is designed for the new SDK. But when I run the code presented in this video which is based on the previous SDK, nothing gets added to the database. Is it normal that this code no longer works? Or am I missing something?
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
No. You can learn the latest SDK from this tutorial: kzfaq.info/get/bejne/ea2igbF417Gneok.html
@dcoderz75
@dcoderz75 3 жыл бұрын
@Adnan Afzal i have one issue in my code please solve this issue firebase.database().ref('messages').on('child_added', function(snapshot) is line code show error is app.js:76 Uncaught ReferenceError: firebase is not defined
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
It means you are not initializing firebase object. Please follow the tutorial from start.
@panipatgaming1387
@panipatgaming1387 Жыл бұрын
Very helpful video Btw i wna use the Template u had in stating i also have no idea to import template pls tell how u got ur templete
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
The link of template is in the description.
@sehayasartvilla6112
@sehayasartvilla6112 3 жыл бұрын
and there is a problem i m trying to download the source zip file but download option is not working please help
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
To download you just need to create an account, verify your email. After verification you need to login. Click the download button and wait for 5 seconds.
@jaybee4976
@jaybee4976 3 жыл бұрын
thanks king
@avanikhokhariya2347
@avanikhokhariya2347 4 жыл бұрын
Hey I am not able to see the list of msg in browser
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Open inspect element of your browser and goto “console” tab. There must be some error in your javascript code.
@respectculture9959
@respectculture9959 4 жыл бұрын
i follow 100% your code and my browser is refreshing after i click submit (not to mention that the messages doesnt save in database) i check console and nothing happened.. what could gone wrong?
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
If your browser refreshes, it means you have error in your sendMessage() function. When page refreshed, the console automatically becomes empty. Try to call that function from console and you will see the error.
@KadatuaCreator
@KadatuaCreator 4 жыл бұрын
Very Good. Thank Bro
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Thank you too!
@denniswouters2765
@denniswouters2765 3 жыл бұрын
I can't get it working. It's asking for a database region, I select my region and code the exact same thing like you but the message isn't showing up in the database. Please help.
@denniswouters2765
@denniswouters2765 3 жыл бұрын
Nvm fixed it myself haha
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Great. What was the solution ? Can you share ?
@marmeladenjungetv769
@marmeladenjungetv769 3 жыл бұрын
Thank you
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You're welcome.
@codebyaaryan6461
@codebyaaryan6461 3 жыл бұрын
Love from nepal and one advice either speak or add background music
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Thank you.
@codebyaaryan6461
@codebyaaryan6461 3 жыл бұрын
@@AdnanAfzal565 Can we make it without firebase
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
@@codebyaaryan6461 Yes, you can do it in Node JS following this: kzfaq.info/get/bejne/mb6Beq2Qnbe9e2Q.html
@anything1830
@anything1830 3 жыл бұрын
Not working
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
What error you are getting ?
@qwertxx5747
@qwertxx5747 3 жыл бұрын
i cant doooooooo help meee
@sliz-g9859
@sliz-g9859 4 жыл бұрын
how can I make massages going up not down help me plsss
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
You can use prepend() instead of append() method.
@ffglitchking3761
@ffglitchking3761 2 жыл бұрын
Sir please help me. When I write a large text it overflows the div. How can I auto resize the div if the sentence is bigger? (Like Messenger)
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
You can use CSS property: word-break: all;
@ffglitchking3761
@ffglitchking3761 2 жыл бұрын
@@AdnanAfzal565 When it overflows the y access the div should automatically increase it's height and fit the texts. How can i do this?
@Abhijeetdhekane
@Abhijeetdhekane 4 ай бұрын
Brother how can I make 1 user to left and another user to right. ? Here in this code more 2 people can join the chat which increases the indext in firebase object and while mapping the sender all sender will mapped in dom. But I want to make for only two peoples. Should I use addclass css property to make the local user to flex in in right ?
@AdnanAfzal565
@AdnanAfzal565 4 ай бұрын
Yes. Or you can use bootstrap grid system to pull right.
@timeless-JAT
@timeless-JAT 3 жыл бұрын
How to display all image from firebase storage using javascript ? Please make a video about it
@muhammadshakir8998
@muhammadshakir8998 Жыл бұрын
can the realtime for web based notification like facebook or instagram use the same concept as this video?
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
No. They use sockets and other technologies. You can learn sockets from here: kzfaq.info/get/bejne/heCioMKpy9rHmoU.html
@mrygtzz
@mrygtzz 4 жыл бұрын
Thank Bro !
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
You're welcome!
@rdiandev5330
@rdiandev5330 3 жыл бұрын
I want to ask, if I add the auth login, then for the chat user name is taken from the database, how do you do it? so that the user does not enter a name every time he wants to chat
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You can save it in database, and also save it in local storage. Then you can check from local storage if the user is logged in or not.
@happyfeet5514
@happyfeet5514 4 жыл бұрын
Can you have multiple different users text each other in multiple different chats (working on a chat feature for a networking site)?
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Yes, you can display all users from left and display each textbox on right. You can follow this: kzfaq.info/get/bejne/heCioMKpy9rHmoU.html
@pranavpowar1645
@pranavpowar1645 3 жыл бұрын
sir exactly at 2:53 second which key did you press, how did the next thing appear. it may sound lame
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
I had copied the firebase-app.js script tag, I just pasted the line using ctrl + v.
@pranavpowar1645
@pranavpowar1645 3 жыл бұрын
@@AdnanAfzal565 which tab did you open a 5:01?
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
It was firebase database main page.
@ZakhoSportClub1987
@ZakhoSportClub1987 Жыл бұрын
We can great chat on iPhone HTML Css JavaScript ?????
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Yes. You need to use frameworks like flutter for that.
@tetra6621
@tetra6621 3 жыл бұрын
Hello, why the codes you have given work on localhost but not on the web host?
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
You need to change extension of file to .php to properly work them in servers.
@bhaimohsin
@bhaimohsin 8 ай бұрын
4:53 at line 31, you wrote firebase.database(). do we still have to write the same code in firebase version 10 or it has to be same?
@AdnanAfzal565
@AdnanAfzal565 8 ай бұрын
You can check in firebase documentation. It might be a little bit different for your version.
@bhaimohsin
@bhaimohsin 8 ай бұрын
@@AdnanAfzal565 thanks for quick reply sir.
@majdtqe1687
@majdtqe1687 Жыл бұрын
Amazing
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Thanks.
@marktombson6358
@marktombson6358 4 жыл бұрын
This looks great, will i be able to put in a page in my website?
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Yes.
@pallixa
@pallixa 3 жыл бұрын
Would it work without fire base? I don’t want it to save and I want it more like a thing simular to Omegle.
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
No. For that you need to use Node JS.
@shouryagupta2990
@shouryagupta2990 4 жыл бұрын
Hi bro, it is repeating the message while displaying I don't know but the database in firebase is working good but while displaying only some error can you please resolve this issue?
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Yes, what error are you facing ?
@SUNYBOI
@SUNYBOI 3 жыл бұрын
Can I use this from two different systems to chat
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Yes, if they are connected with same database.
@SUNYBOI
@SUNYBOI 3 жыл бұрын
@@AdnanAfzal565 i have build exactly the same as you.....so if I send a link to my friend will be both able to chat.....
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
@@SUNYBOI Yes.
@chembetikarunakar814
@chembetikarunakar814 Жыл бұрын
Just with html,css,js and fire base we can make chatbox also??
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Yes
@arianrams5878
@arianrams5878 Жыл бұрын
the delete button onclick is not working for deleteMessage function Uncaught ReferenceError: deleteMessage is not defined at HTMLButtonElement.onclick ((index):1:1)
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
You need to create that function first.
@lovishgoyal2814
@lovishgoyal2814 3 жыл бұрын
Do we need to create collection first before pushing the data. Because it is not working, either i have to create messages collection first and then try to push the data
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
No, it does not require collection to be created. Check your console if there is any error.
@lovishgoyal2814
@lovishgoyal2814 3 жыл бұрын
@@AdnanAfzal565 Created, I was not checking realtime database
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Are you seeing any error in console ?
@mojahjoma8428
@mojahjoma8428 4 жыл бұрын
Ok finally got the hang of html coding. My problem now occurs at the five minutes mark into the video. when your first debug happened. ok my browser let me to enter my name then enter a message but when i press submit it refreshes the page and my database didn't receive any information or data 🤷🏻‍♂️
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Right click on empty area and open console, you will see some error in Javascript.
@SonTruong-di1cv
@SonTruong-di1cv 2 жыл бұрын
thank you so much!!!
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
You are welcome.
@berundatv
@berundatv Жыл бұрын
this code same to without php
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
Realtime sockets does not work well with PHP.
@anjalisingh-my7wk
@anjalisingh-my7wk 3 жыл бұрын
Its such a nice video.But i have some query in here. How we remove first popup thing
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
There is a function named "prompt", you can comment it and write some hard coded text.
@anjalisingh-my7wk
@anjalisingh-my7wk 3 жыл бұрын
@@AdnanAfzal565 ok got it
@GoldenJet3344
@GoldenJet3344 Жыл бұрын
how to initialize firebase database in the latest vr. of firebase?
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
You need to check it from firebase official documentation. They updated their regularly.
@timeless-JAT
@timeless-JAT 4 жыл бұрын
please make this with log in system. it's good but login is more important. thanks and reply, what you think about it?
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Yes, will do.
@aiseknewton
@aiseknewton 4 жыл бұрын
is the chat private? i mean like using some chat room for 2 user only? or if someone joined it become a goup chat?
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
No, it is a group chat only. If you want to have private chat, you can follow this: kzfaq.info/get/bejne/heCioMKpy9rHmoU.html
@luciav.2568
@luciav.2568 2 жыл бұрын
thanks for the great tutorial! I just have one problem...it doesn't write the data into the real time database and i don't know why, did this happen to anyone else?
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Make sure your firebase credentials are right. And also that your database has proper "write" rules.
@qwertxx5747
@qwertxx5747 3 жыл бұрын
im writing but its not appear in fire base
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Check if your firebase configuration is correct, and also if your firebase database does not have any rules.
@rsfaelto1234
@rsfaelto1234 4 жыл бұрын
Thank!!!!
@skyz3ra
@skyz3ra 2 жыл бұрын
NO matter how i import things my browser chrome wont let me use the modules. how tf is it so easy for you to do it witout module errors ?
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Because I am not using modules in this tutorial. If you want to watch a tutorial on modules, you can follow this: kzfaq.info/get/bejne/ea2igbF417Gneok.html
@skyz3ra
@skyz3ra 2 жыл бұрын
@@AdnanAfzal565 ok thx i learned that you need a framework for it to work w modules
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
@@skyz3ra Framework is not necessary. As you can see in that tutorial, that tutorial was plain javascript.
@oxynofiring
@oxynofiring Жыл бұрын
Is it free of cost always
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
No. It is free upto 15 GB.
@mojahjoma8428
@mojahjoma8428 4 жыл бұрын
I am not good at coding, but i wanted to give this a shot. so i was following the video step by step until i ran into sublimetext app? ok i downlaoded it but then i ran into the second tab on the browser? you did not show us how to open these two and link them together!!!!may you help me please!
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
They are already linked. You just need to open 2 different browser windows or tabs with same URL.
@mojahjoma8428
@mojahjoma8428 4 жыл бұрын
Adnan Afzal thanks but still i got no clue, don't forget i am completely clueless at this i have no idea what to do, so i we're following the video step by step. but i didn't know how to open that tab or link sublimetext with the website...
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
@@mojahjoma8428 In this case, I would recommend learn web development first either from some institue or online via udemy.com etc.
@mojahjoma8428
@mojahjoma8428 4 жыл бұрын
Adnan Afzal oh alright, i am looking to develop a real time chatting that works on ios android and macos as well as windows at the same time. this is the challenge the university sat for us to do. time limit only a month thanks bro have a good one tho...
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
@@mojahjoma8428 Good luck.
@kianboonchua975
@kianboonchua975 2 жыл бұрын
Updated to Firebase 9 syntax but can't write to database index.js?v=1633690977:11 Uncaught ReferenceError: firebase is not defined at index.js?v=1633690977:11 at dispatch (jquery.js:4430) at r.handle (jquery.js:4116)
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Make sure you are not using "firebase" object outside the ""
@kianboonchua975
@kianboonchua975 2 жыл бұрын
@@AdnanAfzal565 the firebase script are all declared at the top of the php file, finding it strange.
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
@@kianboonchua975 Check your index.js line 11
@Mohamed-eq3hj
@Mohamed-eq3hj 2 жыл бұрын
he is using the old firebase (v8), the newer version of firebase v9 is modular so you can't use ".firebase" you have to import {getDatabase} , you should look out for how to convert firebase code from v8 to v9
@abriannabrown455
@abriannabrown455 Жыл бұрын
Hello, I’ve finished all these steps. Very helpful. But I’m lost on how I can get it to be available for anyone to access, rather than just a preview of the html locally. Id really like some help because I need this for a school research project, thanks!
@abriannabrown455
@abriannabrown455 Жыл бұрын
(To make it public) I have successfully set up Firebase hosting, idk where to go from there-
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
You need to buy a domain and hosting. Then you can upload the Html files there.
@abriannabrown455
@abriannabrown455 Жыл бұрын
Okay, I already bought a domain. Also, Is the firebase hosting not sufficient enough or is that something different? And where exactly would I upload the files, in the domain or hosting?
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
In the hosting. Cpanel. File manager. Firebase provides 15 GB of storage. After that, you can buy more data.
@abriannabrown455
@abriannabrown455 Жыл бұрын
Not sure what Cpanel is and file manager would be on my desktop right?
@FrostGamingHype
@FrostGamingHype 2 жыл бұрын
seriously fire base makes you allow to like i will use firebase for my trades and ect... stuff gosh
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
👍🏻
@punyapatboottrakoat7341
@punyapatboottrakoat7341 3 жыл бұрын
It doesnot show message on my firestore
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
Check your console for any error.
@RuBex_x
@RuBex_x 2 жыл бұрын
Can we do a online chat also for 1000 people?
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Yes.
@kenkendicks2682
@kenkendicks2682 3 жыл бұрын
Hi, I want the messages to be deleted every time I refresh the page, could you help me pls?
@AdnanAfzal565
@AdnanAfzal565 3 жыл бұрын
If you do not save the message in database, it will automatically be deleted wheb page refreshes.
@kenkendicks2682
@kenkendicks2682 3 жыл бұрын
@@AdnanAfzal565 The messages are saved in the database, but I don't want the messages that have been written and spoken to be seen every time I refresh the page.
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
For that you need to create an is_scene boolean value in your database.
@ex_mesukacikiarvyofilvar9751
@ex_mesukacikiarvyofilvar9751 Жыл бұрын
i need serious help i write this code in sublime text but how did you got into localhost :( i'm sorry i know nothing about it i just searched on youtube ,your video was easy to follow so i watched it but can you tell em were did i made mistake?
@AdnanAfzal565
@AdnanAfzal565 Жыл бұрын
You need to install a software named "XAMPP" and paste your code in "htdocs" folder inside installation directory.
@timeless-JAT
@timeless-JAT 4 жыл бұрын
I don't know why it is not working ? I use your source code with my firebase cdn in blogger and html player. Where it work perfectly like yours ? please reply
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
Check your console using "inspect element". There must be some error in Javascript.
@timeless-JAT
@timeless-JAT 4 жыл бұрын
@@AdnanAfzal565 but I copied your code from source file link.
@AdnanAfzal565
@AdnanAfzal565 4 жыл бұрын
What error are you seeing ?
@annngugi1265
@annngugi1265 2 жыл бұрын
help! I'm stuck at the point where i need to get the name of user when page opens
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Kindly follow the tutorial to the end. It will be fixed.
@annngugi1265
@annngugi1265 2 жыл бұрын
@@AdnanAfzal565 also my database still has nothing in it. I followed the tutorial and step 2 and 3 isn't working
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
Please double check. You might have missed something.
@annngugi1265
@annngugi1265 2 жыл бұрын
@@AdnanAfzal565 how can i solve the cors error? I've tried an extension didn't work
@AdnanAfzal565
@AdnanAfzal565 2 жыл бұрын
How to fix CORS error in Socket IO - Node JS, Express kzfaq.info/get/bejne/oryUnJVl2rzXZZ8.html
I built a chat app in 7 minutes with React & Firebase
8:53
Fireship
Рет қаралды 1,4 МЛН
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 35 МЛН
Gli occhiali da sole non mi hanno coperto! 😎
00:13
Senza Limiti
Рет қаралды 16 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 39 МЛН
How This New Battery is Changing the Game
12:07
Undecided with Matt Ferrell
Рет қаралды 160 М.
ASMR Programming - Weather App With Javascript - No Talking
20:30
AsmrProg
Рет қаралды 2,7 МЛН
Chat Application using PHP with MySQL & JavaScript
2:45:00
CodingNepal
Рет қаралды 1 МЛН
Build and Deploy a Realtime Chat Application - Socket.io, Node.js, and React.js
1:56:45
JS Chat App Using JQuery & PHP (AJAX)
17:43
microcode
Рет қаралды 87 М.
Easiest way to build real-time web apps? WEBSOCKETS with NestJS
38:24
Build a Chat App with HTML, CSS and Vanilla JavaScript
52:23
Ebenezer Don
Рет қаралды 54 М.
One Click Convert Web App to Mobile Application
9:16
Adam Khoury
Рет қаралды 91 М.
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 35 МЛН