D
D
Danil2019-09-08 12:59:50
JavaScript
Danil, 2019-09-08 12:59:50

How to get user data VKWebAppGetUserInfo in Vue.js?

Hello everyone, I have such a problem, I haven’t really worked with VKontakte api and I’ve been writing on vue relatively recently (about half a month), now I’m making an application for vk-mini-apps (studying :) ).
I managed to write a regular calculator, but now I want to display a greeting with the name
I successfully initialized the application

<template>
  <div class="hello">

  </div>
</template>

<script>
import connect from '@vkontakte/vk-connect'
connect.send("VKWebAppInit", {})

export default {
  name: 'HelloWorld',

  props: {
    msg: String
  }
}
</script>

I do everything in helloworld.vue, so that I can just figure it out for now...
The application opens in VKontakte, everything is fine, but how to display the name, etc.?
connect.send("VKWebAppGetUserInfo", {}); - I found this in the VK docks, but I can't figure out how to do it all, thanks!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question