-
Nov 20th, 2010, 06:19 PM
#1
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?
-
Nov 20th, 2010, 07:06 PM
#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
-
Nov 21st, 2010, 07:35 AM
#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. :-)
-
Nov 21st, 2010, 04:49 PM
#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?
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
-
Forum Rules