Subject: | Problem with parse(), JSON::XS, and notifications->send() |
I have parse set to 1 and am using JSON (JSON::XS) to parse responses.
I'm using perl 5.8.7, JSON::XS version 1.3, and Ubuntu 6.06 LTS
When I call $facebook->notifications->send(), the notifications are
sent, but the application chokes on the response, which appears to be blank.
The error that I get is:
JSON text must be an object or array (but found number, string, true,
false or null, use allow_nonref to allow this) at
/usr/share/perl5/JSON/Any.pm line 318.
When I turn debug on, I see the following:
params =
api_key:XXXXXXXXXXXXXXXXX
format:JSON
markup:test
method:facebook.notifications.send
no_email:1
secret:XXXXXXXXXXXXXXXXX
session_key:XXXXXXXXXXXXXXXXX
sig:XXXXXXXXXXXXXXXXX
to_ids:XXXXXXXXXXXXXXXXX
v:1.0
response =
""
at /usr/share/perl5/WWW/Facebook/API/Notifications.pm line 29
JSON::Any is using JSON::XS to parse
""
at /usr/share/perl5/WWW/Facebook/API/Notifications.pm line 29
If I force JSON::Any to use the JSON library to parse, I do not get this
error.
While this is most likely indicative of a problem with JSON::XS or
JSON::Any, or the combination of the two, I thought I would report this
here first. Please let me know if I should direct this bug report
elsewhere.