Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test Facebook Real-time updates

In order to publish real-time updates to my app, Facebook needs needs to perform a post request to my server.

Problem is, my server is my home computer and not publicly addressable from the internet. Bringing a server live to implement this sounds like it could be a pain... can't attach debugger, fiddler etc....

So what's the best way to test the Http Endpoint? Integration tests that simulate the Facebook server? Fiddling with firewalls/NAT to try and get Facebook talking to my home computer?

Any ideas?

like image 350
reach4thelasers Avatar asked Feb 04 '12 11:02

reach4thelasers


2 Answers

You can use ngrok - https://ngrok.com/ - free (pay-what-you-can) service that does exactly what you need. Localtunnel service is down and the developers also recommend ngrok.

like image 170
Alo Sarv Avatar answered Sep 21 '22 01:09

Alo Sarv


In the past, I've used LocalTunnel to do this. It's a nice wrapper around an SSH tunnel and it effectively assigns you a subdomain at localtunnel.com pointing to a port on your localhost.

So basically, when you run it it will spit back an externally accessible sub domain name like xyz.localtunnel.com who's port 80 will point a port you specify on your local box.

You can find it at: http://progrium.com/localtunnel/

It's really great for testing various pubsubhubbub subscription feeds (like Facebook's).

like image 26
Nick Vlku Avatar answered Sep 19 '22 01:09

Nick Vlku