How to debug Facebook Credits API callback?
I'm working on Facebook Credits API integration and still haven't found a solution of how to debug the Facebook Credits callback开发者_Go百科 on localhost...
I will appreciate any idea of to do it.
Thanks a lot!
You can use a tool called localtunnel, it's an easy way to share localhost web servers to the rest of the world.
Install it using RubyGems by running:
$ sudo gem install localtunnel
Run your local web server on any port! Let's say you're running Apache on port 8080.
Run localtunnel passing it the port to share
$ localtunnel 8080
Note: the first time you run localtunnel you have to point to a public SSH key. Check the README if you need help.
Here's an example:
$ localtunnel -k ~/.ssh/id_rsa.pub 8080
You should see something like this:
Port 8080 is now publicly accessible from http://8bv2.localtunnel.com ...
Note: every time you stop your local web server you should run localtunnel again and update your Facebook app configuration.
You cannot use your localhost since facebook's public servers must use HTTP(S) to transfer and receive data from you callback file. You must host this file on a public facing server.
精彩评论