Permalink
Browse files

updated for comments

  • Loading branch information...
1 parent cfd50a6 commit 6a1c7a68cf881069e6ab6c19d523ee05cf7c85fb @coleGillespie coleGillespie committed Aug 10, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 app.js
View
9 app.js
@@ -20,7 +20,7 @@ http.createServer(function (req, res) {
getGooglePlusOnes,
shareObj,
init;
-
+
if(query.q){
getFacebookShares = function(url, shareObj){
@@ -30,10 +30,11 @@ http.createServer(function (req, res) {
if(parsed !== undefined){
var fbShares = {
shares : Number(parsed.link_stat.share_count),
- likes : Number(parsed.link_stat.like_count)
+ likes : Number(parsed.link_stat.like_count),
+ comments : Number(parsed.link_stat.comment_count)
};
shareObj.facebook = fbShares;
- shareObj.total = shareObj.googlePlus.count + shareObj.twitter.count + shareObj.facebook.shares + shareObj.facebook.likes;
+ shareObj.total = shareObj.googlePlus.count + shareObj.twitter.count + shareObj.facebook.shares + shareObj.facebook.comments + shareObj.facebook.likes;
res.end(JSON.stringify(shareObj));
}
}); // end simplexml.parse
@@ -123,6 +124,6 @@ http.createServer(function (req, res) {
}
-}).listen(1337, '0.0.0.0');
+}).listen(1337, '127.0.0.1');
console.log('Server started...');

0 comments on commit 6a1c7a6

Please sign in to comment.