I'm wondering, is it possible to make Facebook application send message via GCM service to my android app updates about new posts/messages/contacts etc? I'm almost sure that something like that is possible for Google+, and also I noticed that Facebooks API messages structure is very similar (or identical) to GCM messages. That is why i think it should be possible.
In other words: Is it possible to make Facebook application work as a server that stores devices IDs and sends messages on some changes via Google Cloud Messaging?
You'd have to drop in some kind of middleware to handle the interaction between the Facebook and Google API's -- with that being said, it's definitely possible.
Facebook's API offers the ability to subscribe to events (realtime). There's only a handful of events that you can subscribe to, and everything is outlined here and here.
Alternatively, you could long poll for data that's not revealed via their realtime API. Just think about API limites, etc. before hand.
Keep in mind that you'll need to create a Facebook application, and your users will have to authenticate the Facebook application so that you have information to whatever info you're trying to access. Sames goes for Google.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With