0

Im getting group wall posts , just fine in the end of the json response , im getting the paging object when i take the previous value and try to http request it:

https://graph.facebook.com/175923872448029/feed?access_token=**********13c0fd29b9-557002013|N-oGZ6q2sNDNg1I3leS0v9U-TDw&limit=25&since=2011-01-25T1100253A3400253A2100252B0000

im getting this error :
{
   "error": {
      "type": "InvalidArgumentException",
      "message": "Could not parse '2011-01-25T1100253A3400253A2100252B0000' into a date or time."
   }
}

what is wrong with the date ?

user63898
  • 29,839
  • 85
  • 272
  • 514

1 Answers1

0

when you open https://graph.facebook.com/175923872448029/feed in your browser you'll notice that the paging link consists of utf numeric codes which have to be decoded prior to using them [edit].

However, when I requested the same object using the PHP SDK I got an encoded URL which works fine.

The reason for that behaviour is explained, I believe, in this post.

In summary, you have to check what the returned string looks like and decode it adequately before you proceed.

Community
  • 1
  • 1
Bartek
  • 1,059
  • 6
  • 18
  • Maybe a little different explanation: it seems that the Graph API returns data in utf-8 charset. I don't really know whether you can specify which charset you're using in c++ but if it's possible make sure it's compatible with the one returned by the Graph API. If you can't then you have to decode the string. Basically this part of the date string is valid `2011-01-25T11`. – Bartek Jan 25 '11 at 23:43
  • its abug in facebook api http://bugs.developers.facebook.net/show_bug.cgi?id=14776 – user63898 Jan 27 '11 at 13:02
  • also i notice if i run it via the browser its returns result , but when i do get request with QNetworkAccessManager-get im getting the error .. – user63898 Jan 27 '11 at 13:09