Announcement Announcement Module
No announcement yet.
FB extensions - updateStatus + request factory Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • FB extensions - updateStatus + request factory

    I've been playing a bit with the Social+Facebook source code, trying to use it on GAE.
    As GAE doesn't allow for new threads, default request factory work -- it's multithreaded.
    So, I've extended the ctor a bit, to take in request factory.
    I've also hacked a GAE based request factory -- pretty trivial to do.

    Another thing I saw is that FBOps::updateStatus could return post-id,
    so we could potentially post comments to that post, via this newly recovered post-id.
    Hence I've changed the FBOps a bit, but still allowing to ignore this post-id.

    (The FB test was also properly modified / fixed)

    The git commit is here:


  • #2
    I've simplified post to updateStatus a bit,
    so it actually gets the post-id info as part of the initial post' response.


    • #3
      I've also added the 'privacy' part from this api docs:

      Following the rules based on what the user configures:

      I need to think how this is actually gonna be used.
      JSON transformation and API wise. :-)


      • #4
        Hmmm, running "real" example / test results in a new post, but w/o message.

        FacebookOperations fbOps = new FacebookTemplate("<some token>");
        FacebookPost post = new FacebookPost("Test" + System.currentTimeMillis(), null, new Privacy(Privacy.Type.EVERYONE));
        String postId = fbOps.updateStatus(post);
        System.out.println("postId = " + postId);
        postId = fbOps.addComment(postId, "Test?");
        System.out.println("postId = " + postId);

        If I add "&message={message}" at the url query, I actually get the message.

        Any idea why the message is missing?