Facebook like/comment inconsistency in JSON response from the Graph API

When there's 0 likes the data is missing from the JSON but when there's 0 comments it actually displays "0 comments" in the data.

Example Graph API JSON response
{
id:"513086950_10150999823946951",
from:{
name:"Joe Jiko",
id:"513086950"
},
message:"Speaking of the graph api, when there's 0 likes the data is missing from the JSON data but when there's 0 comments it actually displays \"0 comments\" in the data.",
actions:[
{
name:"Comment",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
},
{
name:"Like",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
}
],
privacy:{
description:"Public",
value:"EVERYONE"
},
type:"status",
application:{
name:"JoeJiko.com",
namespace:"joejikocom",
id:"160372647359458"
},
created_time:"2012-08-18T04:05:46+0000",
updated_time:"2012-08-18T04:05:46+0000",
comments:{
count:0
}
}

Why would they do this?
I'm now forced in my application to check if likes are undefined whereas it's unnecessary to do so for comments.

Facebook like/comment inconsistency in JSON response from the Graph API

When there's 0 likes the data is missing from the JSON but when there's 0 comments it actually displays "0 comments" in the data.

Example Graph API JSON response

{
id:"513086950_10150999823946951",
from:{
name:"Joe  Jiko",
id:"513086950"
},
message:"Speaking  of  the  graph  api,  when  there's  0  likes  the  data  is  missing  from  the  JSON  data  but  when  there's  0  comments  it  actually  displays  \"0  comments\"  in  the  data.",
actions:[
{
name:"Comment",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
},
{
name:"Like",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
}
],
privacy:{
description:"Public",
value:"EVERYONE"
},
type:"status",
application:{
name:"JoeJiko.com",
namespace:"joejikocom",
id:"160372647359458"
},
created_time:"2012-08-18T04:05:46+0000",
updated_time:"2012-08-18T04:05:46+0000",
comments:{
count:0
}
}
{
id:"513086950_10150999823946951",
from:{
name:"Joe  Jiko",
id:"513086950"
},
message:"Speaking  of  the  graph  api,  when  there's  0  likes  the  data  is  missing  from  the  JSON  data  but  when  there's  0  comments  it  actually  displays  \"0  comments\"  in  the  data.",
actions:[
{
name:"Comment",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
},
{
name:"Like",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
}
],
privacy:{
description:"Public",
value:"EVERYONE"
},
type:"status",
application:{
name:"JoeJiko.com",
namespace:"joejikocom",
id:"160372647359458"
},
created_time:"2012-08-18T04:05:46+0000",
updated_time:"2012-08-18T04:05:46+0000",
comments:{
 count:0
}
}

Why is this?

Facebook like/comment inconsistency in JSON response from the Graph API

When there's 0 likes the data is missing from the JSON but when there's 0 comments it actually displays "0 comments" in the data.

Example Graph API JSON response

{
id:"513086950_10150999823946951",
from:{
name:"Joe  Jiko",
id:"513086950"
},
message:"Speaking  of  the  graph  api,  when  there's  0  likes  the  data  is  missing  from  the  JSON  data  but  when  there's  0  comments  it  actually  displays  \"0  comments\"  in  the  data.",
actions:[
{
name:"Comment",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
},
{
name:"Like",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
}
],
privacy:{
description:"Public",
value:"EVERYONE"
},
type:"status",
application:{
name:"JoeJiko.com",
namespace:"joejikocom",
id:"160372647359458"
},
created_time:"2012-08-18T04:05:46+0000",
updated_time:"2012-08-18T04:05:46+0000",
comments:{
count:0
}
}
{
id:"513086950_10150999823946951",
from:{
name:"Joe  Jiko",
id:"513086950"
},
message:"Speaking  of  the  graph  api,  when  there's  0  likes  the  data  is  missing  from  the  JSON  data  but  when  there's  0  comments  it  actually  displays  \"0  comments\"  in  the  data.",
actions:[
{
name:"Comment",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
},
{
name:"Like",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
}
],
privacy:{
description:"Public",
value:"EVERYONE"
},
type:"status",
application:{
name:"JoeJiko.com",
namespace:"joejikocom",
id:"160372647359458"
},
created_time:"2012-08-18T04:05:46+0000",
updated_time:"2012-08-18T04:05:46+0000",
comments:{
 count:0
}
}

Why is this?

Facebook like/comment inconsistency in JSON response from the Graph API

When there's 0 likes the data is missing from the JSON but when there's 0 comments it actually displays "0 comments" in the data.

 

Example Graph API JSON response
{
id:"513086950_10150999823946951",
from:{
name:"Joe Jiko",
id:"513086950"
},
message:"Speaking of the graph api, when there's 0 likes the data is missing from the JSON data but when there's 0 comments it actually displays \"0 comments\" in the data.",
actions:[
{
name:"Comment",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
},
{
name:"Like",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
}
],
privacy:{
description:"Public",
value:"EVERYONE"
},
type:"status",
application:{
name:"JoeJiko.com",
namespace:"joejikocom",
id:"160372647359458"
},
created_time:"2012-08-18T04:05:46+0000",
updated_time:"2012-08-18T04:05:46+0000",
comments:{
count:0
}
}

Facebook like/comment inconsistency in JSON response from the Graph API

When there's 0 likes the data is missing from the JSON but when there's 0 comments it actually displays "0 comments" in the data.

 

Example Graph API JSON response
{
id:"513086950_10150999823946951",
from:{
name:"Joe Jiko",
id:"513086950"
},
message:"Speaking of the graph api, when there's 0 likes the data is missing from the JSON data but when there's 0 comments it actually displays \"0 comments\" in the data.",
actions:[
{
name:"Comment",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
},
{
name:"Like",
link:"https://www.facebook.com/513086950/posts/10150999823946951"
}
],
privacy:{
description:"Public",
value:"EVERYONE"
},
type:"status",
application:{
name:"JoeJiko.com",
namespace:"joejikocom",
id:"160372647359458"
},
created_time:"2012-08-18T04:05:46+0000",
updated_time:"2012-08-18T04:05:46+0000",
comments:{
count:0
}
}

Why would they do this?
I'm now forced in my application to check if likes are undefined whereas it's unnecessary to do so for comments.

How to upgrade to the latest version of Feng Office (the easy version)

*Download the latest version --> click here (current version is 2.2.3.1 or something)

*Delete everything except for these folders:  cache, config, tmp, upload

and these files: php.ini, .htaccess

(Or delete them. Doesn't really matter.)

*Upload the new files

*Go to /public/upgrade

OK. Done.

upgrade-feng-office

TL;DR

*Make sure you back up everything (I'm not going to tell you how to do that. Google is your friend)

* the upgrade url: /public/upgrade is relative to your FO installation directory. So if you put your files in joejiko.com/feng, your upgrade URL would be joejiko.com/feng/public/upgrade

 

Any questions?

 

Here's the link to the official migration documentation, AKA clusterfuck of ugly and irrelevant.

http://www.fengoffice.com/web/wiki/doku.php/installation:migration

fo-upgrade-page

How to upgrade to the latest version of Feng Office (the easy version)

*Download the latest version --> click here (current version is 2.2.3.1 or something)

*Delete everything except for these folders:  cache, config, tmp, upload

and these files: php.ini, .htaccess

(Or delete them. Doesn't really matter.)

*Upload the new files

*Go to /public/upgrade

OK. Done.

upgrade-feng-office

TL;DR

*Make sure you back up everything (I'm not going to tell you how to do that. Google is your friend)

* the upgrade url: /public/upgrade is relative to your FO installation directory. So if you put your files in joejiko.com/feng, your upgrade URL would be joejiko.com/feng/public/upgrade

 

Any questions?

 

Here's the link to the official migration documentation, AKA clusterfuck of ugly and irrelevant.

http://www.fengoffice.com/web/wiki/doku.php/installation:migration

fo-upgrade-page