bobolounna / restfb

Automatically exported from code.google.com/p/restfb
0 stars 0 forks source link

Post.Likes.getCount() returns random values #161

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The Long value returned by this method doesn't match to the real like count.
I get values ranging from 1 to hundreads for posts having only one or two 
NamedFacebookType objects.

Original issue reported on code.google.com by mehdi.yo...@gmail.com on 28 Oct 2011 at 2:39

GoogleCodeExporter commented 8 years ago
Can you post the JSON that FB is returning?  Thanks

Original comment by m...@xmog.com on 28 Oct 2011 at 2:41

GoogleCodeExporter commented 8 years ago
Ok, I fetched the source json and I can see Facebook is returning wrong values.
I suppose I'll have to count them by myself ;)

For instance:
"likes": {
  "data": [
    {
      "name": "<A friend of mine>",
      "id": "0123456789"
    }
  ],
  "count": 6
},

Original comment by mehdi.yo...@gmail.com on 28 Oct 2011 at 7:30

GoogleCodeExporter commented 8 years ago
OK, thanks - I'll close this out.

Original comment by m...@xmog.com on 28 Oct 2011 at 7:59

GoogleCodeExporter commented 8 years ago
Note that the count value is closer (but could also be wrong) to the real value 
than the returned list of friends.
To get the right data, you have to fetch the post's likes separately, with a 
connection request (/likes).

Original comment by mehdi.yo...@gmail.com on 31 Oct 2011 at 8:20