0

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
  • any errors or warnings in the browser console? that´s the first thing you need to check if something does not work. – andyrandy Feb 06 '19 at 10:50
  • @luschn,thanks, I did catch an error message later , "init not called with valid version". I don't know what this means though lol, at least I got a lead. – June Shaun Feb 06 '19 at 12:30
  • show us the init function then, please add it to your question. you can also keep the appId, it´s safe to be public. – andyrandy Feb 06 '19 at 13:08

1 Answers1

0

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'
});
andyrandy
  • 72,880
  • 8
  • 113
  • 130