I am trying to include a Twitter feed on my VueJS Website, with the styling from Twitter. On a classical html / JS website, this is possible using https://help.twitter.com/en/using-twitter/embed-twitter-feed . But since this method generates an <a>
tag with a <script>
to copy in my code, it triggers a "Fail to compile" error from VueJS when simply pasting it into a component. Is there any way to to this without requiring to rewrite a Twitter-like interface inside a custom-made component?
Asked
Active
Viewed 3,605 times
5

paupaulaz
- 937
- 1
- 11
- 20
-
1Possibly duplicate: see https://stackoverflow.com/questions/45047126/how-to-add-external-js-scripts-to-vuejs-components (and https://medium.com/@lassiuosukainen/how-to-include-a-script-tag-on-a-vue-component-fe10940af9e8 ) – jjmontes Dec 07 '19 at 14:40
-
100% efficient, thanks a lot! – paupaulaz Dec 07 '19 at 14:46
-
1Based on @jjmontes help, I created a Vue component that wraps it up. You can find it here: https://github.com/paupaulaz/VueJSTwitterFeed/tree/master – paupaulaz Dec 07 '19 at 15:06