Search code examples
androidfacebookserver-sidegoogle-cloud-messaging

Setting up server-side for GCM in an android app


I want to implement push notifications in my app to notify when some new data is uploaded on a user subscribed facebook page.I'm going to use GCM for it. I want to know how can i use the facebook api to implement the server side of the GCM. Can i use the facebook server or resources itself as the server for my GCM? If so please help me in doing it. (it is for an android app).


Solution

  • No, you can't. You should have your own server to do that. The implementation would go

    Facebook updates <------ Request and response ---->Your Server

    Your server<---- Request and response ---> GCM Server

    Android Device <---- Request and response ---> GCM Server

    Android Device -----> Generates broadcast receiver

    For more information, refer http://developer.android.com/google/gcm/index.html