Has any one able to test facebook application from facebook against their localhost machine?
Hello,
Yes, I have. I setup the connect URL to localhost/virtual, and it works for me. Are you experiencing a problem? Have you setup the app for the connect URL in the app settings on www.facebook.com/developers?
You'd first need to make sure your website running on localhost is visible to the internet. This can be a very complicated process that goes something like this:
Ensure the website running on your machine is visible to other machines on the LAN. If not, you may need to tweak your machine's firewall settings or website permissions. This will confirm that your website is capable of handling requests from other machines.
Assuming you use an ADSL modem to connect to the internet, you'll need to setup port forwarding (usually port 80) from your ADSL modem to your machine, which may also require your machine to have a static IP on your LAN. This will allow your website to handle requests from the internet, which would normally be blocked by the ADSL modem.
Assuming your internet IP address is dynamic, you'll need to use a Dynamic DNS service to map a host name (e.g. www.something.com) to your dynamic IP address. I use no-ip.com for this, which is free and has never given me any issues. The end result of this will be a hostname that will map to your ADSL modem, and ultimately, a URL that will map directly to your website running on localhost.
You may need to check with your ISP that the port you are running your website on is not being blocked by the ISP. My ISP does block a lot of ports, but provides an option to disable the blocking.
You need to do lots and lots of checking and fiddling to ensure that your website can handle requests from the internet. A handy site for this is canyouseeme.org. If this tool reports your website is not responding, then settle in for hours and hours of frustrating investigation and tweaking trying to get all of the above things working. This is the worst part of the whole process! But you never know, you may get it all working first try.
Finally, you take your Dynamic DNS hostname, the incoming port your ADSL modem is listening to (usually 80), and the virtual directory of you website running on localhost and combine it into a single URL that you will then set as the Canvas URL in your Facebook app's settings. So if my hostname was myfacebookapp.no-ip.com, my port was 80 and my website was living in a virtual directory called fbapp, my canvas URL would be http://myfacebookapp.no-ip.com/fbapp/. You could also give the URL to one of your friends on the internet and ask them if they can see your website - if yes, then your localhost website is set up correctly!
All of the above steps, perhaps with the exception of the last one, require a fair amount of knowledge or experience to perform. Let me know if you need more information on each one; if so, I'll try to find other stackoverflow pages that explain each step in greater detail.
Here is simple way to publish on a facebookwall http://blog.theunical.com/facebook-integration/simple-5-steps-to-publish-on-a-facebook-wall-using-dotnet-c/