jsmrtn / craftagram

Grab Instagram content through the Instagram Basic Display API
Other
14 stars 8 forks source link

Feature Request: Retrieve Instagram profile picture URLs #10

Closed fthues closed 4 years ago

fthues commented 4 years ago

I need to display the user's profile picture along with the posts. Would it be possible to implement a function for retrieving the image URLs? Thanks!

jsmrtn commented 4 years ago

Unfortunately, the Basic Display API doesn't allow us to get the profile picture. The only information we can return for the user is seen at https://developers.facebook.com/docs/instagram-basic-display-api/reference/user.

Until Instagram return the profile picture URL as part of this response, this isn't something we can implement.

fthues commented 4 years ago

Right, this is what I just ran into when I started to implement the feature myself. Seems like a strange oversight on Instagram's part! I know that we can query https://www.instagram.com/USERNAME/?__a=1 and get a result that includes the URLs, but it's not part of the Basic Display API, so I can understand if you don't want to rely on that.

Thanks for the quick reply!

jsmrtn commented 4 years ago

I hadn't realised you could grab data in that way without needing to interface with the API. I'm not sure if instagram will stop access to this at some point, however, as they might be keeping it up for legacy until they drop support in favour of forcing people into the Basic Display API (though, as you mention, they're not returning all of the data you might need in the API regardless).

From that data, I can really only see the following information that is publicly available (that is, you can grab it regardless of private/public status), so I'll return this for use in a variable.

Thanks for your support!

jsmrtn commented 4 years ago

I've cut a release 1.1.0 that includes this data for you @fThues. Check the README for more info 👍

fthues commented 4 years ago

Wow, that was quick! Thanks a lot!