I’ve created integration for sending notifications to Facebook Messenger. It’s available in HACS.
It has two advantages over official integration.
- Sending images (or other media files) is possible
- You can assign user’s id to name and use it as notification’s target.
Registering as facebook developer is still required. I’ve put down instruction in readme.
Give it a try if you like
Facebook Messenger integration in GitHub
I set this up the other night and got it working without too much trouble, so well done!
Does the webhook, auto PSID reply only work for a certain time? I sent messages from other accounts that I wanted to link after a few days, but didn’t get a response.
Your projects at Glitch will expire after some time, if you don’t register an account, I think.
I did notice that after I posted the question here, but Glitch expires after 5 days, and it wasn’t that long.
I tried setting up a new version of the webhook without success, I might go back and try deleting and recreating.
Tried it all again tonight, deleted webhook, recreated everything, no success. In the preview pane of the glitch page the message:
Cannot GET /
So I THINK I know what might be happening.
On my facebook developers page it says
“To ensure quality and prevent abuse of the platform, all Messenger apps must be submitted for review before they can interact with everyone on Messenger.”
Standard access level for the app is limited to this people who have a role on my app.
And using my wife’s facebook as a guinea pig, the only way to give someone a role on my app is for them to have a developers account.
I can submit the app for review, which will take 5 days.
Yes, it’s mentioned on github issue #1 thread, but I paste it here:
First, everyone you want to send messages to must register as facebook developer, then you have to add them as your testers.
At your app configuration page click
Roles and again
Roles , you’ll see
Testers section. Add your gf there.
I just set this up and it was awesome the first 2 days. But unfortunately, Facebook has a policy now where a page can only send an outbound message within 24h of the human sending a message inbound to that page. So you can’t set it and forget it, you’d have to send a message in to HA once a day for it to actually work. Platform Policy Overview - Messenger Platform - Documentation - Meta for Developers
Too bad because I found this a useful replacement for Hangouts.
is this still the case? it makes for a crap experience if it is?
Yes. Although in beta tester mode the text part of the messages seems to arrive, although with some very slow rate limit, like not more than 1 message per few minutes. Any image attachments are rejected unless you send a message back to the page… then everything will work great for 24 more hours.
Does not seem to work, got a “Cannot GET /” at first time