Created
May 12, 2019 17:27
-
-
Save armedoctopus/27c6914f84a1f39f989ccc6f13a2e765 to your computer and use it in GitHub Desktop.
Reactive Facebook Comment Plugin for vue spa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="fb-comments" data-href="https://songxy.com/mastering" data-numposts="5" data-colorscheme="light" data-width="280px"></div> | |
| </template> | |
| <script> | |
| export default { | |
| name: 'FacebookComments', | |
| mounted(){ | |
| this.init() | |
| }, | |
| methods: { | |
| init () { | |
| if (window.FB) { | |
| window.FB.init({ | |
| appId : 'xxxxxxxxxxxxxxx', | |
| status : true, | |
| xfbml : true, | |
| version : 'v3.3' | |
| }) | |
| } | |
| } | |
| } | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment