How to use Facebook SDK with Nuxt.js?
问题 You can see my code. npm install vue init nuxt/koa my-project (koa@2) pages |- login.vue <script> export default { name: 'login', method: { login () { let vm = this FB.login(function (response) { vm.statusChangeCallback(response) }, {scope: 'publish_actions'}) } }, mounted () { console.log('mounted') let vm = this window.fbAsyncInit = () => { FB.init({ appId: 'my-facebook-app-id', cookie: true, xfbml: true, version: 'v2.8' }) FB.getLoginStatus(function (response) { vm.statusChangeCallback