Question

I was using RestFB for adding facebook features to my spring application before. And now I begin to use Spring Social as it seems to be very easy for developement.

Currently I was developing the backend application for a facebook game in spring social where I need to fetch the public posts of a bunch of users. I can do this in restfb as follows

        FacebookClient facebookClient = new DefaultFacebookClient(accessToken);
        List<BatchRequest> batchRequests = new ArrayList<BatchRequest>();
        for (User user : users) {
            BatchRequestBuilder requstBuilder = new BatchRequestBuilder(
                    user.getFbUid() + "/posts");
            requstBuilder.parameters(Parameter.with("limit", limit));
            batchRequests.add(requstBuilder.build());
        }
        List<BatchResponse> batchResponses = facebookClient.executeBatch(
                batchRequests, Collections.<BinaryAttachment> emptyList());

But I cant find any such method in Spring Social for processing batch request that was accepted by Facebook Graph API.

How can I achieve this? Please help me.

Was it helpful?

Solution

My reply on the JIRA issue:

As mentioned in earlier comments, I have a fairly workable prototype for this. It is, however, just a prototype and would need more vetting to know if it's ready to work into the Spring Social Facebook project.

Specifically, it works great for a given Facebook API binding instance...which means it works great when batching requests for a single user. It does not, however, account for batch requests that span multiple users. This will certainly require a bit of rethinking of my prototype.

I was hoping to get this into Spring Social Facebook 1.1.0, but due to a tight schedule to push 1.1.0, I will need to push this off for post-1.1.0. I don't wish to try to rush this, as it's important that it is done right.

FWIW, I believe this is an important feature. But so far we've seen limited interest in it from only a few community members. The JIRA issue has only a single vote. Therefore, even if I believe it's important, it's difficult to justify holding up a release.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top