Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a facebook app in my htdocs folder in python. i am behind an ADSL Modem, then a Wireless Router.

I have a static IP. Now how do i get Facebook to reach me? In the connect and callback URLs what should I enter so that facebook can reach my htdocs folder? I am on a Mac. I am using Django.

I have my django server running on for some reason it does not allow me to run on port 80 (as the tutorial suggested).

any help would be appreciated.

share|improve this question

Port 80: you need root privileges to do that, and the Apache server which ships with the Mac (as Personal Web Server or somesuch) will be using that port, if it's turned on, so you can't bind both the Apache and Django app at the same time. But you can configure Apache to use mod_proxy to reach the Django app.

Reaching you:

  1. you want an externally resolvable hostname so people can find where you are; if you don't have your own domain, start out with something like dyndns
  2. getting through to you: one or the other (or perhaps both) of the ADSL Modem and the WiFi router will be doing NAT to let you have multiple machines at home. You want to open a pinhole in the NATting device, pointing port 80 to one particular machine on the internal LAN. You'll also want to make sure that the DHCP server (part of the same device) always issues the same IP to that device, so lock that MAC address in to a particular IP.

Finally: a popular FB app will absolutely kill your home network connection and one machine will not be able to host it, so while what you're doing might be fine for initial development work, if it looks like the app will be popular you'd better be prepared to spend quite a bit of money on professional hosting.

share|improve this answer

In your router's settings, look for a feature called port forwarding. If your router doesn't show your external IP, you can use Put your IP address in the connect and callback URL along with the port, example:

Point port 8080 to your internal IP in the router:

alt text

Ensure your Mac has a static address. You should also put a DHCP exclusion in the router for the Mac so no other nodes take that IP.

share|improve this answer
from, say my ip is xxx.yyy.zzz.10. i should put that in facebook connect and callback urls? and then in my router config, i should forward the ports (for example, 8080-8085) for the IP xxx.yyy.zzz.10? did i get it right? – amit Dec 15 '09 at 18:37
the above configuration didnt work. – amit Dec 15 '09 at 18:42
For the facebook URLs, ensure your port is in there as well, xxx.yyy.zzz.10:8080 – John T Dec 15 '09 at 18:47
yes it is. also since the IP xxx.yyy.zzz.10 is the IP my ISP gave me (and hence goes to the wireless router), how do i get my server to serve calls made to this IP address. i am on my macbook connected wirelessly to the whole setup? – amit Dec 15 '09 at 18:49
Opening the ports should allow your Mac to serve callbacks to that IP, given the port is forwarded correctly. Check to ensure your router is not configured for remote management, as that will also use port 8080 by default. – John T Dec 15 '09 at 18:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .