nov / fb_graph

This gem doesn't support FB Graph API v2.0+. Please use fb_graph2 gem instead.
MIT License
1.04k stars 191 forks source link

If Facebook returns [], gem should return []. Fixes #350 #351

Closed kenips closed 10 years ago

kenips commented 10 years ago

See #350 - Facebook returns "[]" for some responses. Gem should accept them happily in this case?

kenips commented 10 years ago

Alternatively we should "patch" Facebook's response and return { data: [] }. Thoughts?

nov commented 10 years ago

FbGraph::Collection handles [] as {data: []}, so [] should be fine. BTW, do you have any sample json & sample API call code?

kenips commented 10 years ago

:+1: thanks!! Sorry wasn't able to respond earlier. I agree with you that this is a Facebook bug and we actually opened a bug report with them too. However they insisted [] being valid json in this case.

kenips commented 10 years ago

Hey @nov can we push up v2.7.12 to rubygems.org? Thanks!!

nov commented 10 years ago

ah, sorry. I thought I've already released it, but actually not yet :p I just released it.

kenips commented 10 years ago

No worries. Thanks again!!!