This is a plugin give you the ability to push notifications directly from your WordPress site to mobiles (Android or IOS) via Firebase Cloud Messaging service.
- Copy the
hi-fcm
folder into yourwp-content/plugins
folder - Activate the
HI FCM - Firebase Cloud Messaging
plugin via the plugin admin page
- Push notifications for each post.
- Devices are subscribed in category wise, so that the notifications can also be sent based on the category.
- Specify a sound for the notification.
- Specify a channel id to send notifications.
- Development friendly.
Endpoint | Method | Params |
---|---|---|
/wp-json/hifcm/v1/fcm/notifications | GET | NOTHING |
/wp-json/hifcm/v1/fcm/subscribe | POST | user_id required, integer device_token required, string taxonomy required, string device_name nullable, string os_version nullable, string |
/wp-json/hifcm/v1/fcm/unsubscribe | DELETE, POST | user_id required, integer device_token nullable, string |
/wp-json/hifcm/v1/fcm/send/user | POST | user_id required, integer message required, string title required, string image nullable, url dialog_title nullable, string dialog_text nullable, string dialog_image nullable, url |
Filter | Argument(s) |
---|---|
hi_fcm/excluded_post_types | $post_types array |
hi_fcm/registered_post_types | $post_types array |
hi_fcm/columns_data | $result mixed $post WP_Post $key string |
hi_fcm/term_names | $results array $terms WP_Term_Query $post WP_Post |
hi_fcm/get_tokens | $args array |
hi_fcm/notifications/post | $args array |
hi_fcm/endpoints/notifications | $args array |
hi_fcm/endpoints/subscribe | $args array |
hi_fcm/endpoints/unsubscribe | $args array |
Actions | Argument(s) |
---|---|
hi_fcm/loaded | NONE |
hi_fcm/metabox | NONE |
hi_fcm/dashboard/tabs | NONE |
hi_fcm/dashboard/tabs/contents | NONE |
hi_fcm/notification/response | $response mixed $post WP_Post |
Please note that this plugin is relying on a 3rd party service, which is the Google Firebase Cloud Messaging service (FCM) and your data is being sent through their servers via HTTP API (https://fcm.googleapis.com/fcm/send). This is very legal to use the Google Firebase Cloud Messaging service (FCM), based on their terms and conditions. (https://firebase.google.com/terms/)