Re:Introducing Cloud Functions for Firebase
by phpencil on Thursday March 09, 2017 @03:07PM
(#13832974)
There are a few ways! For example when the user signs in, you could assign them a random chat room https://firebase.google.com/docs/functions/auth-events lets you trigger on initial sign in.
You can also hook up to regular HTTP triggers, and make it like an API call: https://firebase.google.com/docs/functions/http-events
Re:Introducing Cloud Functions for Firebase
by mbleigh on Thursday March 09, 2017 @02:56PM
(#13832842)
You can definitely do this! There are two ways that readily come to mind:
1. Use the Realtime Database as a communication channel to trigger a Cloud Function that then sets up the thing you need.
2. Create an HTTPS function and call it directly from your app, then do the work you need.
Re:Introducing Cloud Functions for Firebase
by inlined on Thursday March 09, 2017 @03:05PM
(#13832940)
When it hits YouTube, check out our talk "Cloud Functions and Firebase". We have a much more complex chat room example than has been possible in the past
I'm building a simple React Native/Expo app where I want users to join random chat rooms so I obviously need some logic to delegate this process. Is Firebase/Cloud Functions something I can consider?
My first thought was "oh, maybe I can let my app call the function directly to add the user to a random chat room" but I don't see how that is possible.