Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Twitter widget not displaying on any page #988

Closed
gitLee47 opened this issue Oct 15, 2015 · 1 comment
Closed

Twitter widget not displaying on any page #988

gitLee47 opened this issue Oct 15, 2015 · 1 comment

Comments

@gitLee47
Copy link

I created a twitter widget using https://twitter.com/settings/widgets and embedded the code provided into the core> home.client.view.html , but the widget does not get rendered. I tried quite a few options like including the script in the layout view, also by removing deep linking '#!' in the urls, but nothing seems to work. I tried creating a completely blank view and putting the code there, that too didn't work. If I create a normal html file outside the project say on my desktop and include the code from twitter, the widget gets rendered. Is there anything I'm missing or is this a bug?

@gitLee47
Copy link
Author

Fixed it!
We need to add <script src="https://platform.twitter.com/widgets.js"></script> in layout.server.view.html
and call twttr.widgets.load() in the controller of the respective view where the widget needs to be shown. This is an angularjs specific issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant