java - Facebook restfb using jsonObject stopped getting likes count -
i using restfb number of likes in specific post, , working well. somehow, morning stopped working, , didn't change in code. problem on following line:
posts.get(i).getjsonobject("likes").getstring("count"))
after retrieving posts page, when trying number of likes post has, this:
com.restfb.json.jsonexception: jsonobject["count"] not found.
i used graph api explorer see if search working , check if "count" appeared on results, , does:
"likes": { "data": [ { "name": "kobi parfait", "id": "100000605529126" }, { "name": "john foley", "id": "100002480987029" }, { "name": "camilla slima", "id": "1267755442" }, { "name": "augustine paz", "id": "677044677" } ], "count": 198648 },
i don't understand going on, can help?
thanks in advance!
on application account should have received alert telling functionality of api going change , need make appropriate changes code.
the 'count' field removed object. according documentation moved 'summary' section looks forgot so.
the way know number of likes go through objects give (only 25 @ time) until end , count them youself.
edit
have @ post, aparently 'summary' within 'likes' connection post object (i havent tried it)
Comments
Post a Comment