More often than not, you will want to test the Facebook Connect feature on your localhost before deploying it on a live site. Facebook, of course, will not recognize the localhost as a valid web server and probably won't even allow you to create the application that points to localhost. So, are you doomed to try the Facebook Connect only on a server that is publicly available?
No, not at all!
Modifying the Host's File
The first thing you will need to do is to point your domain name to the localhost IP address:
This domain name can be set to practically anything you prefer; it can be even dfdgter.khdfslsdfp as long as you're able to remember it.
To make things a bit easier, let's just call our localhost server mightylocal.dev
So, if you're a Windows user, you will need to navigate to C:\windows\system32\drivers\etc\hosts and add the line above to the bottom. For Mac/Linux users, this file is normally located at /etc/hosts, although this can vary with different Linux distributions.
Setup the Facebook App
Create the Facebook App exactly as outlined here; only this time, you will use the mightylocal.dev for your domain name as shown in picture below:<br.>
After you have set the Facebook Application and copied the keys into the JomSocial configuration, you must visit your localhost site Frontend by going to this address:
Yes, the app will work for all subdomains too.
Now, when you’re on http://mightylocal.dev, try to use Facebook Connect. If everything went okay, you’ll be able to use it.