modolabs / Kurogo-Mobile-Web

Kurogo is a PHP framework for delivering high quality, data driven customizable content to a wide range of mobile devices. Its strengths lie in the customizable system that allows you to adapt content from a variety of sources and easily present that to mobile devices from feature phones, to early generation smart phones, to modern devices and tablets
http://kurogo.org
GNU Lesser General Public License v2.1
198 stars 99 forks source link

FacebookDataRetriever no longer works (it seems) - a fix! #73

Open xanderhits opened 10 years ago

xanderhits commented 10 years ago

It seems the FacebookDataRetriever is broken. For me and several other users, as reported on the community boards, it errors out saying that there is an undefined index 'count' on line 136.

Looking at the FB JSON response, it seems that the 'count' index is indeed missing from the 'likes' array. This is a fix for the issue, which first tries to use the 'count' index, but does a quick calculation to calculate the likes if it isn't given by the JSON.