I’m using the Embedded Tweets API.
Everything works great if I have the html markdown from page load.
It also works great if I use the option to add content later, and load the tweets by ID:
twttr.widgets.load(
document.getElementById("container")
);
This is in the documentation here: https://dev.twitter.com/web/javascript/initialization#init
But If I try to load the tweets by class name with this:
twttr.widgets.load(
document.getElementsByClassName("containers")
);
I’m getting this error inside Twitter’s widget.js:
Uncaught TypeError: t.querySelectorAll is not a function
If I log the group of elements to the console, I have a proper group:
Am I doing something wrong or is this a bug on Twitter’s widget?
Thanks!