I don't know if you can use script tags but... there's another problem :
You can't have orphan tags in the widget.html
For example, do this :
<div>
Yes, it does not work, I put script in the lib and upload it on the index.html (head) , then I have this on the source library on my home page when I check debugger. so the html and java code is separate now but still does not work.
Thanks,
My result for use that code and add twitter on lib.
I find solution. I need to add Widget.js without HTML and UI file.
the code is: