diff --git a/js/twitter.js b/js/twitter.js
index 0bfdd04..36c169c 100644
--- a/js/twitter.js
+++ b/js/twitter.js
@@ -2,25 +2,9 @@
   "use strict";
 
   Drupal.behaviors.twitterMediaEntity = {
-
-    createTweets: function (context) {
-      // this === window
-      $('blockquote.twitter-tweet > a', context).each(function () {
-        // this === link
-        var tweetID = this.href.substr(this.href.lastIndexOf('/') + 1);
-        twttr.widgets.createTweet(tweetID, this.parentNode);
-      });
-    },
-
     attach: function (context) {
-      if (typeof twttr === 'undefined') {
-        $.getScript('//platform.twitter.com/widgets.js', this.createTweets.bind(window, context));
-      }
-      else {
-        this.createTweets(context);
-      }
+      twttr.widgets.load();
     }
-
   };
 
 })(jQuery, Drupal);
diff --git a/media_entity_twitter.libraries.yml b/media_entity_twitter.libraries.yml
index 8bc3692..d22dc48 100644
--- a/media_entity_twitter.libraries.yml
+++ b/media_entity_twitter.libraries.yml
@@ -5,3 +5,14 @@ integration:
   dependencies:
     - core/drupal
     - core/jquery
+    - media_entity_twitter/twttr.widgets
+twttr.widgets:
+  remote: //platform.twitter.com/widgets.js
+  license:
+    name: UNKNOWN
+    url: UNKNOWN
+    gpl-compatible: FALSE
+  js:
+    //platform.twitter.com/widgets.js:
+      type: external
+      minified: true
