FB.ui callback is not working from 1st Feb 2018

226 Views Asked by At

FB.ui callback is not working from 1st Feb 2018. The payment window can't pop up in the web game. Any insight would be appreciated.

var options = {
        method: 'pay',
action : 'purchaseitem',
product: product,
request_id:signed
    };
    FB.ui( options, function (response) {
console.log('response:',response);//This part didn't run
1

There are 1 best solutions below

0
On

Judging from the comments, FB.init gets called with an invalid API version:

https://developers.facebook.com/docs/javascript/reference/FB.init/

Make sure it´s a string like "v3.2" and make sure it´s an existing one. For example, this would be the current/latest one:

FB.init({
  appId      : '{your-app-id}',
  status     : true,
  xfbml      : true,
  version    : 'v3.2'
});

Also, make sure you are using your App ID, and remove the brackets, for example:

FB.init({
   appId      : '897348897345',
   status     : true,
   xfbml      : true,
   version    : 'v3.2'
});