Instagram Graph API Get Users Stories
Вставка
- Опубліковано 1 сер 2024
- In this video we learn how to get a users stories data with the Instagram Graph API.
--
Live Demo ⇛ justinstolpe.com/blog_code/in...
--
Code on GitHub ⇛ github.com/jstolpe/blog_code/...
--
Facebook Documentation ⇛ / stories
--
Discord ⇝ / discord
TikTok ⇝ / justinstolpe
GitHub ⇝ github.com/jstolpe/
Instagram ⇝ / justinstolpe
Twitter ⇝ / justin_stolpe
LinkedIn ⇝ / justin-stolpe-3bb05426
Reddit ⇝ / jstolpe
Twitch ⇝ / jstolpe
Facebook ⇝ / stolpejustin
Website ⇝ justinstolpe.com
SoundCloud ⇝ / justin-stolpe
--
Chapters
0:00 Intro
0:34 Overview
1:17 Facebook Documentation
2:09 Get Access Token
2:54 Get Instagram Business Account ID
3:38 Repo and Files
4:20 Instagram API Stories Endpoint with PHP
5:05 Make API Call Function with PHP
6:26 Instagram API Get Media Info with PHP
8:50 Display Stories with HTML
10:39 Outro
--
#programming #developer #coding
Thank you very much!!
0:00 Hey Justin, How you know me so well ? hahaha. nice intro bro.
Hi Justin - Really appreciate these video's. Have been an actual alot of help alongside the unhelpful/confusing facebook documentation. Just wondering if you've seen this issue before "(#100) Tried accessing nonexisting field (stories) on node type (Page)" and/or if I'll be required to submit the application for app review before being able to test any of this functionality (Goal of my app is a Discovery stage development to get an idea if it's feasible to grab all posts a business account has been tagged in - at the moment its all using test data/accounts which hasn't passed app review). I also spotted that these videos were recorded on v11 of the API which is not at v12 though hoping this wont be too much of an issue!
Again, thanks for all these videos and all the best!
Great stuff. You program very similar to me. Doing it piece by piece and shoving in a die to see where things are at. FB and IG programming can be a real pain in the ass when it comes to the backend part. I have a FB app I created a couple of years ago. Adding IG to the app worked but I was not able to create an IG app for some reason? But I was able to request the IG permissions. Still pending at this point. I wish FB had some level of tech support to assist on these kind of issues.
is there a way to search for public stories that feature a specific link or domain?
Hi Justin, great tutorial! It's possible too see stories that belong to users differt from ourselves?
Thank you
Thabks! If they authenticate with your app you can get a user token for them and see their stories.
Hey Justin, thanks for the video! Is it possible to get the stories for normal users? Not just business or creator accounts? I can’t find any documentation for that.
It is not. They only allow you to get stories from business account and get stories that are live.
Hi Justin, great video. is it possible to get story's link of other *public* pages - (not private)?
Only if you have an access token for the user.
Hey Justin, is there any way to fetch the thumbnail & results from previously posted stories. For example, creator authorizes the correct token permissions today, can we access an expired story from two days ago?
Unfortunately the API only allows access to live stories so once it goes away, it can't be accessed with the API anymore.
Can I get another user's stories?
Thanks justin. Is it possible to get story's link of other public pages that I follow, without access token? i want to download all story of another ID that's not in my Facebook apps.
You need a user access token for each user in order to get their data.
Thank you for your video. Are you aware of any programmatic way to obtain the list of accounts that watched your story over the last 24h?
You only can get the count and not a list of people
@@justinstolpe Right. Thank you. I wonder why it is like that though.
Hi Justin, great video! Is there a way to get analytics on these stories, say around how many views it got?
Thanks! Yeah check out my video for getting insights.
@@justinstolpe if you were to stick the stories in a database and rehost the images you'd be able to keep them forever though?
helloo justin . thanks for video . can i get storie member view or the pages taged on story ? in this api
thanks! As of right now I don't think so
Hi Justin!
I can't choose between Graph and Instagram Basic Display API. I need to "extract" the number of likes / comments from the post. What do you recommend?
You should use the Graph API
@@justinstolpe but the Graph API is only for business accounts no?
I see a lot of websites where you can type your username and without any permission they fetch your account data (e.g. Sites where you can see someone's else stories). Some sites also have a live ajax search to choose your account and download your posts. It's frustrating the path to know how they achieved that. I'm confused a lot between those who use IG API and those that seems they don't.
Yeah the api can be confusing. If you have an access token and your app is live, you can use the business_discovery to query users by username. Here is my video on it ua-cam.com/video/8tu4DPSIQyA/v-deo.html&lc=UgzmZ_m58hvXzncsCbt4AaABAg.9aMZxqzgNQe9b6FKFFI5Iw
Hi Justin, I wonder if there is any similar API for TikTok? I would love to extract insight data from the business suite.
From what I can tell TikTok does not have any API to get this info at this time but I hope they release one soon!
@@justinstolpe looking forward to it
Hey Justin, it's possible to get story viewer list, then how to get all story viewer list in instagram api
No you can't get the viewer list
Hi Justin, the generated token is permanent? or do you have to update how?
yeah you can get a long lived one I have a video on it ua-cam.com/video/dEDKOcPuXlU/v-deo.html
So the api works only against your own account. You cannot use it to view other people's accounts as you can normally do while browsing around on Instagram on a browser?
to get other peopls accounts they need to authenticate with your application and then you can get a user access token for them which you can use to get their information.
@@justinstolpe The hashtag search actually allows one see posts from any account. Just saw that in the code.Thanks
How do I get the photo once it's taken?
Like when we take a photo and there's a button to share it in stories?
You can get the media_url field when getting data back for a post or story.
Can I make website using insta api where user can see any public profile stories without authentication
No you can't see Users Stories without an access token
It’s not available now unfortunately 😢
Sir i want to ask is this official api of Instagram. Because if we use unofficial then Instagram disabled our account to say som unauthorized activity on your accounts
Yeah this is the official one
@@justinstolpe sir i have a app where i want to download Instagram Stories mean if i login my account then all stories from my account which post other i can view or download can you tell me sir which api i use
@@Topharyanvi yeah just follow this video and you can get your stories
Hi Justin! Great!
Where I can find the files?
thanks
Thanks! Github link is in the description but I will paste it here as well github.com/jstolpe/blog_code
@@justinstolpe thanks! but is possible to get the facebook stories?
@@stefanopettenuzzo3167 I believe you can but I have not done it before.
@@justinstolpe Thanks! I wait yo to test :)
Hi Justin!
Can I take access token for "Instagram Graph API" after auth. with instagram account? If the answer is "yes", how do I do it?
Check out my Instagram Graph API access token video that should help you out
@@justinstolpe you used in video auth. Facebook (with an Instagram account linked to it). I want Instagram auth, WITHOUT Facebook (for users, who don't have FB account). It's possible?
P.s Sorry for spam and misunderstanding :(
@@hellsing2914 The IG Api needs to use the auth through FB to allow users to authenticate your app.
@@justinstolpe Thanks you Justin!
P.s It's my first pay project, thanks to you I can go further in my career
@@hellsing2914 great job and good luck!!
Is it possible to insert a link to a website from the story? how?
Not exactly sure but here is the documentation for stories developers.facebook.com/docs/instagram-api/reference/ig-user/stories
@@justinstolpeNo reference to this here and anywhere
@@justinstolpe No URL to reference =/
Is it possible to reply a story?
It is not possible to reply with the api to a story.
I can get the number of people who saw my stories. I just want to know the number of people who saw the story