How to share in social media from a Vuejs app?

Bernard Doci picture Bernard Doci · Mar 3, 2018 · Viewed 7.5k times · Source

I am using vue-social-sharing library for sharing in social media and it works fine but the only problem that I am encountering is that I can't share my article title, description, and image on Facebook. When I press the facebook share button it shares my website image title and og:description instead of my particular article.

var SocialSharing = require('vue-social-sharing');
Vue.use(SocialSharing);

<social-sharing url="https://vuejs.org/"
  title="The Progressive JavaScript Framework"
  description="Intuitive, Fast and Composable MVVM for building interactive interfaces."
  quote="Vue is a progressive framework for building user interfaces."
  hashtags="vuejs,javascript,framework"
  twitter-user="vuejs"
  inline-template>
<network network="facebook">
  <i class="fa fa-facebook"></i> Facebook
</network>
<network network="twitter">
  <i class="fa fa-twitter"></i> Twitter
</network>

Answer

multi prise picture multi prise · Mar 14, 2018

You can't. Facebook doesn't scrap javascript yet. Look into prerendering or serversider rendering.