I have an Razor Pages application where I would like the user to be able to tweet from. I have gone through the documentation here and generated the code for a new button from here.
<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
If I put the code produced anywhere in the main part of my application it seems to work fine.
However, if I then try to put the tweet button inside a modal popup body it doesn't render.
If I then just remove the <script>
part of the generated code:
The Anchor appears as a normal anchor without any of the additional functionality you get with the widget.js within the <script>
.
Has anyone come across this or a similar issue before, or have any ideas to what could be causing the problem? I have been looking into it for a few days now and not getting very far.