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

КОМЕНТАРІ • 72

  • @matejatrikich97
    @matejatrikich97 Рік тому +1

    Thank you very much!!

  • @BangJeyYT
    @BangJeyYT 2 роки тому +3

    0:00 Hey Justin, How you know me so well ? hahaha. nice intro bro.

  • @joshc7935
    @joshc7935 2 роки тому +1

    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!

  • @hansguth
    @hansguth 2 роки тому +1

    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.

  • @oz-zy
    @oz-zy 2 роки тому

    is there a way to search for public stories that feature a specific link or domain?

  • @fabriziomoro5327
    @fabriziomoro5327 2 роки тому

    Hi Justin, great tutorial! It's possible too see stories that belong to users differt from ourselves?
    Thank you

    • @justinstolpe
      @justinstolpe  2 роки тому +1

      Thabks! If they authenticate with your app you can get a user token for them and see their stories.

  • @shonlev-ran8439
    @shonlev-ran8439 2 роки тому +1

    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.

    • @justinstolpe
      @justinstolpe  2 роки тому

      It is not. They only allow you to get stories from business account and get stories that are live.

  • @yairtsadik1373
    @yairtsadik1373 2 роки тому

    Hi Justin, great video. is it possible to get story's link of other *public* pages - (not private)?

    • @justinstolpe
      @justinstolpe  2 роки тому

      Only if you have an access token for the user.

  • @chelseaoswald5780
    @chelseaoswald5780 2 роки тому

    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?

    • @justinstolpe
      @justinstolpe  2 роки тому

      Unfortunately the API only allows access to live stories so once it goes away, it can't be accessed with the API anymore.

  • @asdoomn8072
    @asdoomn8072 2 роки тому +1

    Can I get another user's stories?

  • @vibetext
    @vibetext 2 роки тому

    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.

    • @justinstolpe
      @justinstolpe  2 роки тому

      You need a user access token for each user in order to get their data.

  • @nikitaaznaurian2557
    @nikitaaznaurian2557 Рік тому

    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?

    • @justinstolpe
      @justinstolpe  Рік тому

      You only can get the count and not a list of people

    • @nikitaaznaurian2557
      @nikitaaznaurian2557 Рік тому

      @@justinstolpe Right. Thank you. I wonder why it is like that though.

  • @DevashishSharma
    @DevashishSharma Рік тому

    Hi Justin, great video! Is there a way to get analytics on these stories, say around how many views it got?

    • @justinstolpe
      @justinstolpe  Рік тому

      Thanks! Yeah check out my video for getting insights.

    • @pickyourteethup
      @pickyourteethup Рік тому

      ​@@justinstolpe if you were to stick the stories in a database and rehost the images you'd be able to keep them forever though?

  • @filmbilm5840
    @filmbilm5840 2 роки тому

    helloo justin . thanks for video . can i get storie member view or the pages taged on story ? in this api

    • @justinstolpe
      @justinstolpe  2 роки тому +1

      thanks! As of right now I don't think so

  • @hellsing2914
    @hellsing2914 3 роки тому +1

    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?

    • @justinstolpe
      @justinstolpe  3 роки тому

      You should use the Graph API

    • @techtome7606
      @techtome7606 3 роки тому +2

      @@justinstolpe but the Graph API is only for business accounts no?

  • @michelemincone1788
    @michelemincone1788 2 роки тому

    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.

    • @justinstolpe
      @justinstolpe  2 роки тому

      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

  • @0swald612
    @0swald612 3 роки тому

    Hi Justin, I wonder if there is any similar API for TikTok? I would love to extract insight data from the business suite.

    • @justinstolpe
      @justinstolpe  3 роки тому +1

      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!

    • @0swald612
      @0swald612 3 роки тому

      @@justinstolpe looking forward to it

  • @rakeshprajapati6544
    @rakeshprajapati6544 2 роки тому

    Hey Justin, it's possible to get story viewer list, then how to get all story viewer list in instagram api

  • @joeldavila4982
    @joeldavila4982 2 роки тому

    Hi Justin, the generated token is permanent? or do you have to update how?

    • @justinstolpe
      @justinstolpe  2 роки тому

      yeah you can get a long lived one I have a video on it ua-cam.com/video/dEDKOcPuXlU/v-deo.html

  • @ibexy
    @ibexy 2 роки тому

    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?

    • @justinstolpe
      @justinstolpe  2 роки тому

      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.

    • @ibexy
      @ibexy 2 роки тому

      @@justinstolpe The hashtag search actually allows one see posts from any account. Just saw that in the code.Thanks

  • @thaiscordeiro1232
    @thaiscordeiro1232 2 роки тому

    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?

    • @justinstolpe
      @justinstolpe  2 роки тому +1

      You can get the media_url field when getting data back for a post or story.

  • @talhanasim8194
    @talhanasim8194 2 роки тому

    Can I make website using insta api where user can see any public profile stories without authentication

    • @justinstolpe
      @justinstolpe  2 роки тому

      No you can't see Users Stories without an access token

  • @MrCFD-si9ot
    @MrCFD-si9ot Рік тому

    It’s not available now unfortunately 😢

  • @Topharyanvi
    @Topharyanvi 2 роки тому

    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

    • @justinstolpe
      @justinstolpe  2 роки тому

      Yeah this is the official one

    • @Topharyanvi
      @Topharyanvi 2 роки тому

      @@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

    • @justinstolpe
      @justinstolpe  2 роки тому +1

      @@Topharyanvi yeah just follow this video and you can get your stories

  • @stefanopettenuzzo3167
    @stefanopettenuzzo3167 2 роки тому

    Hi Justin! Great!
    Where I can find the files?
    thanks

    • @justinstolpe
      @justinstolpe  2 роки тому +1

      Thanks! Github link is in the description but I will paste it here as well github.com/jstolpe/blog_code

    • @stefanopettenuzzo3167
      @stefanopettenuzzo3167 2 роки тому

      @@justinstolpe thanks! but is possible to get the facebook stories?

    • @justinstolpe
      @justinstolpe  2 роки тому

      @@stefanopettenuzzo3167 I believe you can but I have not done it before.

    • @pette6888
      @pette6888 2 роки тому +2

      @@justinstolpe Thanks! I wait yo to test :)

  • @hellsing2914
    @hellsing2914 3 роки тому

    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?

    • @justinstolpe
      @justinstolpe  3 роки тому

      Check out my Instagram Graph API access token video that should help you out

    • @hellsing2914
      @hellsing2914 3 роки тому

      @@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 :(

    • @justinstolpe
      @justinstolpe  3 роки тому

      @@hellsing2914 The IG Api needs to use the auth through FB to allow users to authenticate your app.

    • @hellsing2914
      @hellsing2914 3 роки тому

      @@justinstolpe Thanks you Justin!
      P.s It's my first pay project, thanks to you I can go further in my career

    • @justinstolpe
      @justinstolpe  3 роки тому

      @@hellsing2914 great job and good luck!!

  • @ronielsampaio
    @ronielsampaio Рік тому

    Is it possible to insert a link to a website from the story? how?

    • @justinstolpe
      @justinstolpe  Рік тому

      Not exactly sure but here is the documentation for stories developers.facebook.com/docs/instagram-api/reference/ig-user/stories

    • @ronielsampaio
      @ronielsampaio Рік тому

      ​@@justinstolpeNo reference to this here and anywhere

    • @ronielsampaio
      @ronielsampaio Рік тому

      @@justinstolpe No URL to reference =/

  • @igoroliveira7081
    @igoroliveira7081 2 роки тому

    Is it possible to reply a story?

    • @justinstolpe
      @justinstolpe  2 роки тому

      It is not possible to reply with the api to a story.

  • @maruxina09
    @maruxina09 2 роки тому

    I can get the number of people who saw my stories. I just want to know the number of people who saw the story