Details
-
Type:
Improvement
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: API Binding
-
Labels:None
Description
Facebook Graph allows nested requests for any request.
GET graph.facebook.com /{node-id}? fields=<first-level>{<second-level>}
This opperation cant be done with spring social. For instance, when i try to get all posts from an user with it respectively likes.
There's no space in API to bind extra nested request:
getConnection().getApi().feedOperations().getPosts(pageParams);
I also can't use the fetchConnections from FacebookTemplate because an exception is thrown when retrieving nested objects. For example, the code:
PagedList<FacebookPost> posts = getConnection().getApi().fetchConnections("me", "posts", FacebookPost.class, "likes," + Arrays.asList(IPost.ALL_POST_FIELDS).stream().collect(Collectors.joining(",")));
Generates this exception:
com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token at [Source: [email protected]; line: 1, column: 2612] (through reference chain: java.util.ArrayList[1]->com.roberto.social.domain.FacebookPost["likes"])