I put together a little test script a few months ago to help resolve a problem with a client of mine that was unable to get facebook connect working.
Turns out the server was not able to resolve DNS
I am attaching a little PHP script you can place in the root of your site and then run it from a browser by going to yoursite.com/dbtest.php
It will test fopen, curl and gethostbyname php functions to make sure they can connect to graph.facebook.com.
The script will tell you if there are any problems with your server setup that will prevent facebook connect from working.