Search code examples
facebookfacebook-graph-apifacebook-appsfacebook-ads-apifacebook-graph-api-v2.2

Facebook post object


I'm using Facebook Ads API. And receive AdCreative's property object_story_id in form %PageID%_%PostID%.
Then I can get two obects from FB API:

So here I have several qusetions:
Why there are two different objects, don't they represent the same logical structure?
Why sometimes I can access the first one, but can't - the second?


Solution

  • Don't attempt to infer meaning from the value of id

    Though the format of some IDs is currently the post ID appended with '_' another identifier, that's not a given, and neither part of that exploded token can be assumed to be a valid object

    The id should be treated as strictly an opaque identifier - if you're given an id which isn't usable in a subsequent call where it should be usable per the documentation, that's likely a bug