开发者

How to debug Facebook Credits API callback?

开发者 https://www.devze.com 2023-04-02 20:15 出处:网络
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'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.

  1. Install it using RubyGems by running:

    $ sudo gem install localtunnel
    
  2. Run your local web server on any port! Let's say you're running Apache on port 8080.

  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消