Barabus

canSubscribeBotAsync don`t works

Recommended Posts

        FBInstant.initializeAsync().then(function()
        {
            FBInstant.startGameAsync().then(function()
            {
                FBInstant.player.canSubscribeBotAsync().then(function(can_subscribe)
                {
                    if (can_subscribe)
                    {
                        console.log("We can subscribe for bot.");
                        FBInstant.player.subscribeBotAsync().then(function()
                        {
                            console.log("We are successfully subscribed for bot.");
                        }).catch(function (e)
                        {
                            console.log("Subscribtion for bot has been failed, error: " + e.message)
                        });
                    }
                    else
                    {
                        console.log("We can not subscribe for bot, and have no error.")
                    }
                }).catch(function (e)
                {
                  console.log("We can not subscribe for bot: " + e.message)
                });
            });
        });

The app always returns "We can not subscribe for bot, and have no error." What is wrong in this code?

Share this post


Link to post
Share on other sites

@Barabus Well, you are calling canSubscribeBotAsync to check if that user can subscribe to the bot. It looks like this player cannot, that is it. We do not list all the cases this might happen, as it is subject to change, but you can assume that it returns the correct value.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.