Site logo

Archived topic

Call insertFCM.php

3 replies · Started by Steig on September 26, 2019

Viewing posts 1–4 of 4

Hello,
I'd like to send notifications to ios/android devices when a post is made. I'm using firebase. The entire sequence is setup and working, but I need help in calling the insertFCM.php file when a post is made. How would I go about doing that?

Hi there,

Unfortunately I'm not familiar with insertFCM.php, so I can't help much.

Perhaps they have a support team you can reach out to?

I've not had luck with firebase support, which is really posting questions to stackoverflow.

All I need to do when a post is submitted, is send the title and body of the post to a specific URL (e.g. https://mydomain.com/sendNotification.php). Once that file receives the info, it does the rest of the job so that the alerts are sent.

How can I cause the post title & body to be sent to this URL? I imagine I should truncate the body to a certain number of characters; perhaps 30.

This sort of thing is outside the scope of this forum, unfortunately. I think this might be a good starting point: https://www.w3schools.com/php/php_forms.asp

The post title can be called using get_the_title(), and the content can be called using get_the_excerpt().

This archived topic is closed to new replies.