abjerner / Skybrud.Social.Instagram

.NET wrapper and API implementation for the Instagram Basic Display API and Instagram Graph API.
https://packages.limbo.works/skybrud.social.instagram/
MIT License
13 stars 5 forks source link

GetRecentMedia gives only first pic #8

Closed NileshRShah closed 6 years ago

NileshRShah commented 6 years ago

I am using GetRecentMedia() and it gives me the last 20 posts, but it gives only the first image from the post.

i.e. if my last post has 5 images in it, then I am not able to get those all 5 images, I only get the first image in the post.

So GetRecentMedia() gives me the first image from my last 20 posts. But I want each and every image from my post.

abjerner commented 6 years ago

@NileshRShah each media item is an instance of either InstagramImage, InstagramVideo or InstagramCarousel (which all inherit from the InstagramMedia base class).

For instances of InstagramCarousel, you'll have the CarouselMedia property with the extra properties.

You can read a bit more about that here: https://social.skybrud.dk/instagram/media-types/

NileshRShah commented 6 years ago

thanks @abjerner that's what I want exactly. But I can't find the InstagramCarousel class, I have 0.9.6 installed and it is shown as the latest nuget package

abjerner commented 6 years ago

If you have installed v0.9.6 then that's the Skybrud.Social package, and not theSkybrud.Social.Instagrampackage. Only the latter supports theInstagramCarousel`.

It may be a little confusing with the two packages, but Skybrud.Social is the old package which is nearly six years old, while Skybrud.Social.Instagram is the newer, but still-in-beta version. Even though Skybrud.Social.Instagram is still in beta, it should be fine to use in production (we're doing that our selves). The beta label primarily means that I may introduce breaking changes before the the first stable release.

I would recommend switching to Skybrud.Social.Instagram if possible, which again depends a bit on other packages you're using. For instance my Skybrud.Social.Umbraco package is not yet compatible with the new Skybrud.Social.Instagram package.

I hope that helps ;)

NileshRShah commented 6 years ago

Thanks so much! helped a lot! I got it running. closing this issue.