Brad Gianulis
Brad Gianulis

Reputation: 47

need help implementing facebook credits

I've read a few of the other posts on getting started with implementing Facebook credits and I've downloaded the sample code from github: https://github.com/facebook/credits-api-sample.

The only changes I had made to the sample code are:

I've uploaded all these files to my server:

On the Facebook app edit page:

I have not registered my company. Is that required for testing? I do not have a secure canvas url. Is that required? The app is in sandbox mode.

When I run the test app, I see the index page. When I click on the "Pay with Facebook" button, this error pops up:

There was a problem processing your payment. Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again.

When I close the dialog, there is a message:

Transaction failed!

Error message returned from Facebook:

The entity (class EntApplication) backed by id cannot be seen by the current viewer 0 (EntID: )

Can someone please tell me what I am doing wrong?

Upvotes: 0

Views: 2107

Answers (1)

Brad Gianulis
Brad Gianulis

Reputation: 47

I found out what the problems were:

  1. In order to get this to work, you need to have the company registration filled out.

  2. After that is done (and this was not obvious), you need to actually select the company from the drop down list. This is all done in the credits section.

  3. You must have a secure canvas url set in the basic settings section (i.e. https://example.com/app/index.html)

  4. I'm not sure if you have to have the callback as a secure url in order for the test to work, but it does make sense that this would be required.

  5. The test will not work in sandbox mode.

Hopefully this will help others that may run into similar problems.

Now I have to figure out how to get this to work using the facebook-actionscript sdk.

Upvotes: 3

Related Questions