Disabled share counter for Facebook
authorAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2017 16:55:26 +0000 (17:55 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2017 16:55:26 +0000 (17:55 +0100)
wcfsetup/install/files/js/WCF.Message.js

index 7a8cb44354159bcc48f6b585c18b8560c0e21eac..fd0cf760958f45b03e6848e630b8eb288e229d87 100644 (file)
@@ -3230,7 +3230,7 @@ WCF.Message.Share.Page = Class.extend({
                var self = this;
                this._provider = {
                        facebook: {
-                               fetch: function() { self._fetchFacebook(); },
+                               fetch: undefined,
                                link: $container.find('.jsShareFacebook'),
                                share: function() { self._share('facebook', 'https://www.facebook.com/sharer.php?u={pageURL}&t={text}', true); }
                        },
@@ -3435,11 +3435,7 @@ WCF.Message.Share.Page = Class.extend({
         * Fetches number of Facebook shares.
         */
        _fetchFacebook: function() {
-               this._fetchCount('https://graph.facebook.com/fql?q=SELECT%20share_count%20FROM%20link_stat%20WHERE%20url=%27{pageURL}%27', $.proxy(function(data) {
-                       if (data.data[0].share_count) {
-                               this._provider.facebook.link.children('span.badge').show().text(data.data[0].share_count);
-                       }
-               }, this));
+               /* Facebook no longer offers a public API */
        },
        
        /**