Closed Brighty28 closed 5 years ago
@Brighty28 I can see that the API exposes an attachment
property in the JSON for some of the posts, but Facebook haven't documented this property in their own documentation (at least what I can see), so Skybrud.Social doesn't support it either.
Nevertheless, I will look into wether it makes sence to add support for the property anyways ;)
@abjerner thank you for coming back to me I was looking at Graph API Explorer: Graph API Explorer
With the below fields: FitCubs/posts?fields=child_attachments,name,picture,story,created_time,message,attachments,source
If that helps also interested in being able to access the height and width attributes for media if possible:
Sorry for the waiting time. Facebook still has no documentation for getting attachments as part of the post object, but I've tried building something based on API responses and the documentation for the attachments edge. This is now part of Skybrud.Social.Facebook.
When you have an instance of FacebookPost
, you can now access an array of attachments through the Attachments
property. I haven't found anything so far about child attachments (not even from API responses), but an attachment may have a number sub attachments (also not documented by Facebook from what I can tell).
I've tried to map the properties I've discovered via the API, so you'll now also be able to get the width and height of the image of an attachment.
Let me know how this works out for you ;)
Closing due to inactivity.
Can you advise how I get story attachments for example:
These are the fields I have so far
And the code: