Skip to content

Commit

Permalink
Applying fix from Julienh#294 by @sphism
Browse files Browse the repository at this point in the history
  • Loading branch information
njt1982 committed Aug 22, 2016
1 parent 00a9bab commit 55fe161
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions dist/jquery.sharrre.min.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions jquery.sharrre.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/js/jquery.sharrre.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@
count += parseInt(temp, 10);
}
//get the FB total count (shares, likes and more)
else if (json.data && json.data.length > 0 && typeof json.data[0].total_count !== "undefined") { //Facebook total count
count += parseInt(json.data[0].total_count, 10);
else if (json.share && json.share.length > 0 && typeof json.share.share_count !== "undefined") { //Facebook total count
count += parseInt(json.share.share_count, 10);
}
else if (typeof json[0] !== "undefined") { //Delicious
count += parseInt(json[0].total_posts, 10);
Expand Down
4 changes: 2 additions & 2 deletions src/js/platform/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SharrrePlatform.register("facebook", function (options) {
return {
settings: defaultSettings,
url: function (url) {
return "https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%27{url}%27&callback=?";
return "http://graph.facebook.com/?id={url}&callback=?";
},
trackingAction: {site: 'facebook', action: 'like'},
load: function (self) {
Expand Down Expand Up @@ -85,4 +85,4 @@ SharrrePlatform.register("facebook", function (options) {
"&t=" + opt.text + "", "", "toolbar=0, status=0, width=" + this.settings.popup.width + ", height=" + this.settings.popup.height);
}
}
});
});

0 comments on commit 55fe161

Please sign in to comment.