Hey guys, new challange!
Can we pick the user instagram avatar from instagram username?
Example
User name: willsmith
Hey guys, new challange!
Can we pick the user instagram avatar from instagram username?
Example
User name: willsmith
There’s no direct way to do that I think. You would have to fetch the link from Instagram’s API.
The link to fetch, taking @willsmith as an example:
https://www.instagram.com/willsmith/?__a=1
The profile image URL (profile_pic_url_hd):
https://unavatar.io/ seems to offer it but you have to get a Microlink Pro account.
I’d like to get it by username by I don’t have any knowledge to do it @ThinhDinh
with Cloudinary you can get an avatar in a simple manner
Oh, sorry. Didn’t know that Instagram is no longer available.
Can @Manu.n @Roldy @SantiagoPerez or someone else achieve this? One of my client wants it, but we can figure it out how to do it instead of manually
Hello @Lucas_Pires
Sorry I can’t help with this operation.
Thank you Manu!
No man! Haven’t even tried before.
Thank you!
It’s late here so I can’t try it but maybe worth a read
It’s not late because I havent achieve this yet. Thanks, gonna take a look!
Hi. Happy to help you if I can. But it’s too late here, will try tomorrow.
It seems to me that the easiest and most feasible way to do this, is as @ThinhDinh indicated at the beginning.
So, if it were for one of my APPs, I would create an apps script function to be launched frequently with trigger that updates the photo column. If you want to do so, I’ll write it to you, it takes a little while.
Let me know.
Just a warning, be careful as you can run into some kind of hourly or daily limit for accessing the API. I can recall reading about it on StackOverflow like a year ago.
Calls to the Instagram Graph API are counted against the calling app’s call count. An app’s call count is unique for each app and app user pair, and is the number of calls the app has made in a rolling 24 hour window. It is calculated as follows:
Calls within 24 hours = 4800 * Number of Impressions
The Number of Impressions is the number of times any content from the app user’s Instagram account has entered a person’s screen within the last 24 hours.
Thanks to your warning, the function may try to retrieve the information and if it fails then it will try next time. This is because I believe we cannot know the Number of Impressions.
What do you think @ThinhDinh ?
Still seems too risky for my liking considering we don’t know the number of impressions. It can fail anytime.
Surely, the idea would be to manage failure as well, trying again at the next trigger. It certainly can cost a lot in terms of time quota limits for scripts, especially if there are a lot of profiles to query.
It all depends on the degree of acceptability of the data in the APP (sometimes the image is there, sometimes not).