Announcement Announcement Module
Collapse
No announcement yet.
FB extensions - updateStatus + request factory Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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:
    * http://git.springsource.org/spring-s...dbac61864369e9

    Wdyt?

  • #2
    I've simplified post to updateStatus a bit,
    so it actually gets the post-id info as part of the initial post' response.
    * http://git.springsource.org/spring-s...ac0d3f9ee8a16a

    Comment


    • #3
      I've also added the 'privacy' part from this api docs:
      * http://developers.facebook.com/docs/reference/api/post

      Following the rules based on what the user configures:
      * http://git.springsource.org/spring-s...d924e1038c0a5d

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

      Comment


      • #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?

        Comment

        Working...
        X