Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Retrieveing data when using api 2.7 #215

Open
mlarizzate opened this issue Sep 30, 2016 · 0 comments
Open

Retrieveing data when using api 2.7 #215

mlarizzate opened this issue Sep 30, 2016 · 0 comments

Comments

@mlarizzate
Copy link

mlarizzate commented Sep 30, 2016

Hi guys!
I'm having some problems with lots of methods.

When i want to get a post, comment, conversationMessage or photo objects y need to send the list of all parameters I need from all these objects.

Example for Post:

String[] fields = new String[]{"created_time", "type,id", "from", "message", "to", "story", "updated_time", "object_id", "properties", "place", "message_tags", "picture"};
PagedList<Post> posts = facebookTemplate.pageOperations().facebookOperations(pageId).fetchConnections(pageId, "feed", Post.class, postParametersMap, fields);

Example for conversartionMessages:

fields = new String[]{"id", "created_time", "tags", "from", "to", "message", "attachments"};
        PagedList<ConversationMessage> conversationsMessages = facebookTemplate.pageOperations().facebookOperations(pageId).fetchConnections(conversationId, "messages", ConversationMessage.class, params, fields);

Example for coments:

String[] fields = {"created_time", "id", "attachment", "from", "message", "comment_count", "parent", "object"};
        Comment comment = facebookTemplate.pageOperations().facebookOperations(pageId).fetchObject(objId, Comment.class, fields);

I think this is the right way to do it, but when i need to get a Photo:
Photo photo = facebookTemplate.mediaOperations().getPhoto(postId);
My Photo object comes only with Id and Created_time parameters.

if I use an app with api 2.3 it does not happen, all the attributes are present.
I think you miss to add the availability to add a fields array in come methods
is this a bug or i'm doing something wrong?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant