# Firebase Messaging: A simple way to post real-time shared messages using Firebase

**URL:** https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58
**Category:** Promote your App
**Tags:** firebase, messaging, chat, database
**Created:** [September 7, 2016, 1:42am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58 "2016-09-07T01:42:09Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![arun](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/arun/32/42_2.png) [@arun](https://community.thunkable.com/u/arun)
#### Post date: [September 7, 2016, 1:42am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/1 "2016-09-07T01:42:09Z")

</div>

Firebase Messaging: A simple way to post real-time shared messages using Firebase.

I wanted to create a real-time message board where people could post messages to each other and the app would update with the most recent message that was posted. I wanted the most recent message to be viewable whenever you open the app. I did this using the FirebaseDB component. With this component, you can store data in Google’s cloud and access it from any device. As soon as a message is submitted in this app, the message is stored in the cloud using Firebase. Since Google’s Firebase database always has the most recent message stored, you can always view the most recent message when you open the app, whether it was submitted when you had the app open or closed.

I used the

`when Firebase.DataChanged`

block to notify the app anytime a new message was submitted from any user of the app.

Here you can find my[Firebase\_Messaging.aia](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/1X/afd9c17ae8f481cf4d0520bc32c28dbe71dd17c6.aia) (1.9 KB) and my [Firebase\_Messaging.apk](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/1X/a5ca5f734777774c48d5ed698b4419a4995d3337.apk) (2.8 MB).

 ![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/1X/6e49bf94987e02ce842bb3a8dee829dc85db722c.png)

---

<div class="post-metadata">

### Author: ![pavi2410](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pavi2410/32/16588_2.png) [@pavi2410](https://community.thunkable.com/u/pavi2410)
#### Post date: [September 11, 2016, 11:43am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/2 "2016-09-11T11:43:22Z")

</div>

Thanks for sharing 🙂

---

<div class="post-metadata">

### Author: ![Mika](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mika/32/5022_2.png) [@Mika](https://community.thunkable.com/u/Mika)
#### Post date: [September 16, 2016, 5:16pm UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/3 "2016-09-16T17:16:30Z")

</div>

very goog example how to use the firebase component! 🙂  
do you wanna make an exclusive snippet for my snippet page?  
if yes write me a private mail 😊

---

<div class="post-metadata">

### Author: ![anybodycandevelop](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/anybodycandevelop/32/26630_2.png) [@anybodycandevelop](https://community.thunkable.com/u/anybodycandevelop)
#### Post date: [March 14, 2017, 10:33pm UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/4 "2017-03-14T22:33:39Z")

</div>

please does firebase auto fill in the token text box when you input your firebase url. this is because after adding my firebase url i got auto fill of the token [section.is](http://section.is) it the right way/ new

---

<div class="post-metadata">

### Author: ![Helios](https://avatars.discourse-cdn.com/v4/letter/h/858c86/32.png) [@Helios](https://community.thunkable.com/u/Helios)
#### Post date: [March 15, 2017, 2:53am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/5 "2017-03-15T02:53:04Z")

</div>

This don’t seem to be able to replicate that. Moreover, it should **NOT** happen because your token is a secret, and if someone can derive the token just by having your URL(which is public), then that’s a _major_ security breach.  
I would like to see if this is a bug or a mere coincidence.  
When you changed the URL, did the token change to the correct one or was it a string of random letters?  
Helios

---

<div class="post-metadata">

### Author: ![anybodycandevelop](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/anybodycandevelop/32/26630_2.png) [@anybodycandevelop](https://community.thunkable.com/u/anybodycandevelop)
#### Post date: [March 15, 2017, 9:20am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/6 "2017-03-15T09:20:30Z")

</div>

after inputing the url i got a lenghty string

---

<div class="post-metadata">

### Author: ![Helios](https://avatars.discourse-cdn.com/v4/letter/h/858c86/32.png) [@Helios](https://community.thunkable.com/u/Helios)
#### Post date: [March 15, 2017, 9:25am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/7 "2017-03-15T09:25:45Z")

</div>

Did it match with the actual token of your project or was it this:  
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NzMxNTQyODEyLCJ2IjowLCJkIjp7InVpZCI6IjUyMDZiZGJkLTQ3ZjctNGFmNC1hYjY3LTdhMGFiYzY3NDVhNiIsInByb2plY3QiOiIiLCJkZXZlbG9wZXIiOiJ2aXNod2FzYWRpZ2FAZ21haWw6Y29tIn0sImlhdCI6MTQ4OTU0NjAxMn0.JsPI2\_Zp2y1XprS61fLHtgBHp0xAMDzzYLqFVpfsjZM

---

<div class="post-metadata">

### Author: ![Denis](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@Denis](https://community.thunkable.com/u/Denis)
#### Post date: [June 14, 2017, 8:43pm UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/8 "2017-06-14T20:43:37Z")

</div>

Just came along this thread. It’s a very handy event to use. Is there a best practice how to setup an own firebaseDB and what is actually the difference to the Default one?

---

<div class="post-metadata">

### Author: ![treespirit](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@treespirit](https://community.thunkable.com/u/treespirit)
#### Post date: [November 2, 2017, 9:44am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/10 "2017-11-02T09:44:22Z")

</div>

guys can anyone help me?  
i am trying to build a app for chatting…  
so how to take the messages stored in firebase to the screen

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [November 2, 2017, 9:55am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/11 "2017-11-02T09:55:03Z")

</div>

Check out my “Thunkable Instant Messenger” app which uses Firebase:

[https://domhnallohanlon.gitbooks.io/the-evolution-of-chat/content/aolim.html](https://domhnallohanlon.gitbooks.io/the-evolution-of-chat/content/aolim.html)

Also, you can test out @arun’s sample app at the top of this thread:

> [@Firebase Messaging: A simple way to post real-time shared messages using Firebase](http://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58):
>
> Firebase Messaging: A simple way to post real-time shared messages using Firebase. I wanted to create a real-time message board where people could post messages to each other and the app would update with the most recent message that was posted. I wanted the most recent message to be viewable whenever you open the app. I did this using the FirebaseDB component. With this component, you can store data in Google’s cloud and access it from any device. As soon as a message is submitted in this app,…

---

<div class="post-metadata">

### Author: ![Hayder](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hayder/32/153829_2.png) [@Hayder](https://community.thunkable.com/u/Hayder)
#### Post date: [November 30, 2017, 8:57am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/12 "2017-11-30T08:57:55Z")

</div>

Please, how to make a multiple line in this app. To show more than one message. Help please.

---

<div class="post-metadata">

### Author: ![indian](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/indian/32/11311_2.png) [@indian](https://community.thunkable.com/u/indian)
#### Post date: [December 22, 2017, 4:00am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/13 "2017-12-22T04:00:17Z")

</div>

How can we show multiple Conversations like whats-app and many texting apps? Any clue or idea?

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [December 22, 2017, 8:01pm UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/14 "2017-12-22T20:01:01Z")

</div>

If you’re an experienced developer, or looking to learn some new programming skills then @Barreeeiroo’s open source app “Chatable” has all of these features:

> [@ChatAble - A chat system](http://community.thunkable.com/t/chatable-a-chat-system/5328):
>
> Hey there wave After some problems and delays, I would like to publish #chatable source code There has been lots of Sneak Peeks in this post, but probably everyone wants the .AIA to see how ti has been made [http://community.thunkable.com/t/chatable-project/3077?u=barreeeiroo](http://community.thunkable.com/t/chatable-project/3077) I’m not going to make a very long post, as I think everything about the system has been already published in the upper topic Also, I would like to say that if there are no errors reported, in a week I will make a t…

---

<div class="post-metadata">

### Author: ![losasencio](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/losasencio/32/14831_2.png) [@losasencio](https://community.thunkable.com/u/losasencio)
#### Post date: [December 21, 2018, 10:50am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/16 "2018-12-21T10:50:50Z")

</div>

It has permission problems, how can I use my own firebase and avoid error. 😶

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:52am UTC](https://community.thunkable.com/t/firebase-messaging-a-simple-way-to-post-real-time-shared-messages-using-firebase/58/17 "2024-11-08T11:52:16Z")

</div>


