The Twitter widget works fine on sites using the standard http protocol but gets blocked by the browser (chrome at least) when site uses https protocol.

Error message given is, "This page includes script from unauthenticated sources"

CommentFileSizeAuthor
Capture1.PNG2.95 KBXeneX
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonhines’s picture

I had this issue and was in a hurry so I just applied the following code (clearly not the right solution, it should match the page protocol, I should probably just fix it and submit a patch):

diff service_links/js/twitter_button.js.old service_links/js/twitter_button.js

--- service_links/js/twitter_button.js.old    2013-07-26 15:31:34.000000000 +0000
+++ service_links/js/twitter_button.js    2014-02-07 15:44:30.046823855 +0000
@@ -9,7 +9,7 @@
         $('a.service-links-twitter-widget', context).each(function(){
           $(this).attr('href', $(this).attr('href').replace(/((?:counturl\=|^))http[s]*\%3A\/\//g, "$1"));
         });
-        $.getScript('http://platform.twitter.com/widgets.js', function () {
+        $.getScript('https://platform.twitter.com/widgets.js', function () {
           this.scriptadded = true;
         });
       }
jonhines’s picture

I went to create a patch for this and discovered that it was already fixed by this issue https://drupal.org/node/2020881

jonhines’s picture

Status: Needs review » Closed (duplicate)