Results 1 to 4 of 4

Thread: FB extensions - updateStatus + request factory

  1. #1
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default

    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

  3. #3
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default

    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. :-)

  4. #4
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default

    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?

Tags for this Thread

Posting Permissions

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