Ver código fonte

[add] facebook share

wenliming 2 anos atrás
pai
commit
3cb2ab0f98
2 arquivos alterados com 32 adições e 2 exclusões
  1. 17 0
      pages/facebook/shareCallback.vue
  2. 15 2
      pages/index.vue

+ 17 - 0
pages/facebook/shareCallback.vue

@@ -0,0 +1,17 @@
+<template>
+  <div></div>
+</template>
+
+<script>
+export default {
+  name: "shareCallback",
+  data() {
+    return {
+    };
+  },
+  mounted() {
+  },
+};
+</script>
+
+<style scoped></style>

+ 15 - 2
pages/index.vue

@@ -260,7 +260,7 @@ export default {
 			},
 			currencyIconPath: '',
 			title: '',
-			twitterTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
+			metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
 			jumpUrl: jumpUrl,
 			status: '',
 			page_index: 1,
@@ -292,11 +292,24 @@ export default {
 				},
 				{
 					name: 'twitter:title',
-					content: this.twitterTitle
+					content: this.metaTitle
 				},
 				{
 					name: 'twitter:image',
 					content: this.detail.postBizData.imagePath || ''
+				},
+				// facebook 
+				{
+					name: 'og:url',
+					content: this.jumpUrl + this.detail.postId
+				},
+				{
+					name: 'og:title',
+					content: this.metaTitle
+				},
+				{
+					name: 'og:image',
+					content: this.detail.postBizData.imagePath || ''
 				}
 			]
 		}