Andy
Andy

Reputation: 810

How get all fields Api-Graph v2.8 of Facebook

I want to try something that looks like this:

GET/v2.8/PageFacebook/posts?fields="all??"

This is because by default it does not bring me the "name" or "type" of the post. And I don't want to do the field-by-field consultation.

Upvotes: 10

Views: 10936

Answers (1)

SamHecquet
SamHecquet

Reputation: 1836

If you want to have the list of all available fields, you need to do a query on a Post Id like this:

GET/v2.8/PostId?metadata=1

Then you can make your selection and specify which fields do you want in your future request. For instance:

/GET/v2.8/PageFacebookId/posts?fields=id,promotion_status,target,shares,message_tags,source,place,event,parent_id,reactions.limit(0).summary(true),child_attachments,message,caption,story,full_picture,picture,link,name,description,type,status_type,created_time,comments.limit(0).summary(true),sharedposts,privacy,updated_time,story_tags,permalink_url,coordinates

Upvotes: 24

Related Questions