The example code only shows how to use the Http protocol connection to FCM.
There should also be an example using the Admin SDK.