Using Phoenix to build a Facebook chat client

Hi Guys,

I am planning on building a small CRM for our company using Phoenix. We have a company Facebook Page and we rely on messages quite a bit in our industry. I am trying to find out if it’s possible to integrate with the messenger of our page from within our app. For example: Customer visits the page via Facebook and starts chatting. One of the employees should be able to talk back to that person via the Phoenix web app. I’ve read the FB documentation but their docs are always cryptic. Any guidance/suggestions is much appreciated!

It looks like this is possible. The idea is that you set up an endpoint and facebook posts the messages to it. So here’s the page about that and more specifically here is the specific message event you will be interested in. Then this looks relevent for sending messages to the user.

I think your best bet is to just get in there and start playing around. Maybe make a dummy page so you don’t accidentally send a customer 1,200 hello worlds.

4 Likes

Yah, I thought that too, sounds like just digging in will be my best bet at this point.

Solid advice.

Reminds me of that time I used a coworkers email address for testing a script (attempting to make a joke) and accidentally sent him a bazillion emails due to an infinite loop bug. :joy:

I once had an alert that was triggered, that was inside a loop where it should have been outside. And the messages were set up to be forwarded to SMS to my phone. And this was in the days before unlimited texting. 300+ messages at $0.20 each before I could shut the damned thing off :frowning: