2

I've been trying to integrate Facebook Credit purchases into my app, but any call to the pay dialog results in the error message "The application you are using is not responding." To eliminate any application specific problems, I've downloaded the Credits API Example and am just trying to get that to work -- it results in the same error message.

I've been trying for a couple of days to pinpoint this error message, but with no luck. Here's what I know so far:

  • Clicking the "Pay with Facebook" button results in error code 1383008, but there's no error_message being displayed.

  • I'm running Apache 2.2 on Windows 7. As far as I can tell, Apache is configured to allow requests from any source.

  • The canvas page is configured to point at http://localhost:8080/facebook.../ while the callback page is configured to point at http://localhost:8080/facebook.../callback.php. However, I have verified that the callback page is not being accessed.

I'm not sure how to verify whether or not Facebook is receiving my data correctly or if it's passing anything back. Any help in this regard would also be appreciated!

hammar
  • 138,522
  • 17
  • 304
  • 385
Dave
  • 23
  • 3

2 Answers2

1

Credits attempts to make a callback to a web accessible url (or IP). If Facebook's spider cannot fetch the information from the callback script, then it will continue to return errors, since Facebook expects you to send information like the cost, name, image, custom parameters in order to process the payment.

Have a look at the creating a callback section of the docs: http://developers.facebook.com/docs/creditsapi/

Francis Pelland
  • 784
  • 4
  • 11
  • According to the process flow indicated in the API documentation, the first thing Facebook should do is call 'callback.php' with method set to 'payments_get_items' which is where Facebook will get information such as cost, name, etc. As mentioned above, 'callback.php' is not being hit at all. Also, I'm running the Credits API Example application straight out of the box, so the code should not be a problem. Is there a way I can see what Facebook is trying to do? – Dave Aug 25 '11 at 16:13
  • Wish there was, but Facebook attempts to connect to the url that you provide in your settings, so if you give them http://localhost:8080/facebook.../callback.php, then it won't actually call you. Change localhost to your IP or upload to a public server and change your app settings to point to it. – Francis Pelland Aug 25 '11 at 16:25
  • Ah, so Facebook resolves 'localhost' from its perspective, not mine. When I put 'callback.php' on my server and pointed the Callback URL there, this error went away. Thank you! – Dave Aug 25 '11 at 16:35
  • Sorry I wasn't more clear. That is correct. Facebook makes the request from its servers. Good luck! – Francis Pelland Aug 25 '11 at 16:37
  • Took a while (I don't administer the router), but I've verified this solution. Thanks again! – Dave Aug 27 '11 at 02:48
0

Adding to Fancis' answer, what you can do is setup a hole in your firewall and connect it to a dynamic dns service such as http://dyn.com/. Then you will be able to test your credits code.

Jason King
  • 649
  • 7
  • 13