In the documentation above there are only two parameters.
However, in the code example they are using fields as parameters.
I tried searching the docs but I’m still unclear on how fields and params are different.
Are they completely interchangeable or are there specific times to use each?
2
Answers
I reached out to Facebook Support and this was their answer:
Fields are the specific data elements you can request about an object.
A user’s e-mail address, a post’s message, a page’s cover photo – those are fields.
Parameters allow you to limit the selection of data, based on specific criteria.
You request a page’s feed, but you only want posts from a specific time frame – then you use parameters like
since
anduntil
, for example.If you are familiar with basic SQL, you could use this as an analogy: Fields would be the column names you specify after SELECT; Parameters would be the WHERE clause.