Vk game

How can I invite friends on my vk game ? Can anyone help.

Unless I am missing something, I think you may be in the wrong forum. This is a game development forum for the Phaser game engine. I don’t know what “Vk” is (although Google brought up a Russian browser game site), but you may want to ask whoever owns or develops the game. Maybe the owner uses Phaser, but we wouldn’t be able to help you with using their game. Cheers!

I developed a game using phaser . They need invitation to friends. https://vk.com/dev/clientapi?f=5.%20showInviteBox - for inviting friends. I imported vk script. I created a button, used this function onclick function friends() { VK.callMethod(“showInviteBox”); } - not working. What is it that I am missing something

Okay, sorry. I am not familiar with Vk script. So you have created a game with Phaser and are trying to integrate a 3rd-party library and API for social features in your game? Are you getting an error? Is nothing happening when you call the method?

Yes , nothing happens when I press that button.

Have you added a console.log directly above the API call method to ensure that line of code is being reached? Check the Network tab in the DevTools and see if a network call is being made. And you checked the console and there are no errors?

No , I have not done this . How can I do this ? Also , I have created game using other engines too and I am able to retrieve game on vk website developer portal but button is not working .

If you are using Chrome, press F12 to bring up the DevTools. You will want to spend a LOT of time familiarizing yourself with the DevTools, as they will be your best friend while you are developing for the browser. It is almost impossible to fix some issues without those tools.

As far as the Vk library itself, I don’t know anything about it and I am figuring not a lot of others will be here either. We can help with Phaser issues, but when it comes to a library or API function not working, you will probably need to get support from the people who maintain Vk. It looks like they do have some support on that page you linked. Click “Support” at the top, select “Feedback” and then select “API questions”. Hopefully there is a forum in there somewhere.

2 Likes

I couldn’t found a forum related to vk developers .

Sorry, I’m not really sure how to help further. I would suggest to use the Chrome DevTools to confirm if an API call is actually being made. Press F12 to open up the DevTools and then try the action that should make the API call. Check the “Network” tab and see if you see any calls on there. If the call isn’t being made, then it sounds like the problem could be on your end. If it is, then it sounds like the problem is on Vk’s end.

1 Like