I started the nuxt app with vue init nuxt / express myprojectstart.
Here is my directory.
page
|- _project.vue
|- project
| - index.vue
The configuration of _project.vue
export default {
head () {
return {
title: this.project.title,
meta: [
{property: 'fb:app_id', content: '12873892173892'},
{property: 'og:title', content: this.project.title},
{property: 'og:image', content: this.project.image},
],
}
}
},
async asyncData ({app, params, error}) {
const project = await app. $ axios. $ get (`/ project`)
return {
project: project.project,
}
}
}
However, if you press the Facebook Share button, the desired title and image will not appear.
I think this is a server side rendering issue. But I could not solve this problem.
I would appreciate your help.