Browse Source

Update VMM.ExternalAPI.js

replace the protocol-relative twitter API URL.. with explicit secured protocol (https) for twitter calls, as it doesn't accept non-SSL calls.
pull/780/head
Alaa Ali 10 years ago
parent
commit
5aa103b161
  1. 4
      source/js/Core/Media/VMM.ExternalAPI.js

4
source/js/Core/Media/VMM.ExternalAPI.js

@ -166,7 +166,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
getOEmbed: function(tweet, callback) { getOEmbed: function(tweet, callback) {
var the_url = "//api.twitter.com/1/statuses/oembed.json?id=" + tweet.mid + "&omit_script=true&include_entities=true&callback=?", var the_url = "https://api.twitter.com/1/statuses/oembed.json?id=" + tweet.mid + "&omit_script=true&include_entities=true&callback=?",
twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOutOembed, VMM.master_config.timers.api, tweet); twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOutOembed, VMM.master_config.timers.api, tweet);
//callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet); //callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
@ -210,7 +210,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
getHTML: function(id) { getHTML: function(id) {
//var the_url = document.location.protocol + "//api.twitter.com/1/statuses/oembed.json?id=" + id+ "&callback=?"; //var the_url = document.location.protocol + "//api.twitter.com/1/statuses/oembed.json?id=" + id+ "&callback=?";
var the_url = "//api.twitter.com/1/statuses/oembed.json?id=" + id+ "&omit_script=true&include_entities=true&callback=?"; var the_url = "https://api.twitter.com/1/statuses/oembed.json?id=" + id+ "&omit_script=true&include_entities=true&callback=?";
VMM.getJSON(the_url, VMM.ExternalAPI.twitter.onJSONLoaded); VMM.getJSON(the_url, VMM.ExternalAPI.twitter.onJSONLoaded);
}, },

Loading…
Cancel
Save