Error 1151 During Call to FB Credits API

1.2k Views Asked by At

I try to use the Credits API on external site and get the following error in popup:

*API Error Code: 1151

API Error Description: Sorry, but this app may not be eligible to accept Facebook Credits. If this app has accepted credits before, please try again.

Error Message: Invalid Application*

As mentioned here:

Facebook Credits. Error 1151

only FB canvas applications are eligible for this.

BUT!

If I take the popup URL and change the display parameter from popup to page, it works fine.

So, I'm wondering, can I use it on external sites or not?

Why does it work as page and doesn't work as popup?

2

There are 2 best solutions below

3
On BEST ANSWER

Why does it work as page and doesn't work as popup?

Because it's explicitly designed that way, as the documentation clearly mentions:

This dialog only supports desktop display modes: page. (https://developers.facebook.com/docs/reference/dialogs/pay/)

And https://developers.facebook.com/docs/credits/ also very clearly states,

Facebook offers a payments platform that enables developers to leverage our payments services to charge their users on Apps on Facebook as well as their Mobile web Applications.

0
On

We were getting this error code, but on the canvas. Just putting this up here in case anyone else is googling around and as stumped as we were.

We discovered that the payments dialog cannot be called from within a frameset. So, another reason to avoid framesets.