Jason Penick
Jason Penick

Reputation: 268

Retrieving a post's 'type' field with Graph API

So when attempting to retrieve a posts 'type' field through the Graph API I have come across a problem.

If I use the format USERID_POSTID when retrieving the information from the Graph API it return a 'type' field for the post (status, link, video, checkin, etc).

The problem comes in if i try to query a post just by its POSTID. When sending a query this way I get all the same data EXCEPT a type field.

I have tried specifically requesting the fields when using just the POSTID and it is displeased if i ask for a type field.

So my questions are; Is it possible to get the 'type' field of a post when using just its ID as opposed to the USERID_POSTID format?

Im using the PHP SDK 3.1.1 if that makes any difference.

What really throws me off is the Graph API Explorer seems to be able to deduce the type when viewing it just by the POSTID

Upvotes: 2

Views: 1123

Answers (1)

alexl
alexl

Reputation: 1914

it put the type when I added metadata=true in the query string, not sure why

Upvotes: 2

Related Questions