Results 1 to 5 of 5
  1. #1
    roise_r is offline Member
    Join Date
    May 2011
    Posts
    9
    Rep Power
    0

    Default Error “Illegal datetime format” when tying to parse Facebook Insights.

    Trying to use OData4j to get Facebook Insights data for my page using the following code:

    ODataConsumer consumer;
    oentitykey = OEntityKey.parse("blahblah");
    String URI = "http://facebook-insights.cloudapp.net/Insights/blah-
    blahbl";
    consumer = ODataConsumer.create(URI);
    for (OEntity app : consumer.getEntities("PageMetrics")) {
    System.out.println(app);
    }

    I get the following exception: Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: bad keyString: datetime'2011-05-31T00%3A00%3A00' Caused by: java.lang.IllegalArgumentException: Illegal datetime format 2011-05-31T00%3A00%3A00

    this is the line in the raw data that I think it is trying to parse: "end_time": "2011-05-31T07:00:00+0000"

    When I use PowerPivot for Excel to display the data, it displays it fine.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,185
    Rep Power
    20

    Default

    What is OData4j?
    Do they have their own forum, or QA section?

  3. #3
    roise_r is offline Member
    Join Date
    May 2011
    Posts
    9
    Rep Power
    0

    Default

    I have posted the same question to the OData4j forum, facebook forum, stackoverflow, oracle and a few more... and I have failed to get any answer (not just a wrong answer). Is this really such a hard question??? I am getting desperate.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,185
    Rep Power
    20

    Default

    It might be dead easy...for someone who uses OData4J, or even OData.
    But they're both pretty new.

  5. #5
    roise_r is offline Member
    Join Date
    May 2011
    Posts
    9
    Rep Power
    0

    Default

    The problem , I am almost sure it's the facebook insights date-time format, but Facebook moderators fails to respond to any questions. I think their forum is just for looks.

Similar Threads

  1. Replies: 1
    Last Post: 06-01-2011, 12:02 AM
  2. Illegal start of expression error pls help me!
    By Gayethiri_86 in forum New To Java
    Replies: 12
    Last Post: 05-12-2010, 04:06 PM
  3. Illegal start of expression error
    By lukermsdn111 in forum New To Java
    Replies: 9
    Last Post: 03-22-2010, 02:31 PM
  4. Servlet Error -illegal start of expression
    By raghu9198 in forum Java Servlet
    Replies: 2
    Last Post: 04-22-2009, 12:12 AM
  5. Parse error
    By Eric in forum Advanced Java
    Replies: 2
    Last Post: 07-01-2007, 07:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •