How to Get a Users Posts with the Instagram Graph API

Поділитися
Вставка
  • Опубліковано 11 лип 2024
  • In this video we learn how get a users Instagram posts with the Instagram Graph API.
    --
    Live Demo ⇝ justinstolpe.com/blog_code/in...
    --
    Code on GitHub ⇝ github.com/jstolpe/blog_code/...
    --
    Instagram Graph API Documentation ⇝ / business-discovery
    --
    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:09 Tutorial Goal and End Result
    0:57 Instagram Graph API Documentation Overview
    2:23 Using the Facebook Graph Explorer Tool
    3:23 Code/Repository/Defines Setup
    3:53 Getting Datat from the API
    6:06 HTML/CSS up the Data!
    7:39 Outro
    --
    #programming #developer #coding

КОМЕНТАРІ • 166

  • @lorettaibrahim
    @lorettaibrahim Рік тому +2

    Omg this is IT, I have loong searched for a video on this..thank you, thank you

  • @frankdrolet9439
    @frankdrolet9439 Рік тому +2

    First time on your channel, really good tutorial, subscribed!

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

    Hey justin,
    Really appreciate it bro.
    I was looking it for months, even i read all documentation from Graph API but you got it.
    Thank you man.

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

      Yeah graph api can be confusing and or a pain to figure out!

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

    this is dynamic ? i mean when yoy get more followers change it??

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

    I don't understand, I copied the code, but no matter what I do, it never loads any posts of profile data. How do I make it work?

  • @lxtlkingbastard
    @lxtlkingbastard 10 місяців тому

    thank you for making this video !!

  • @1alpha
    @1alpha 9 місяців тому

    hey buddy thanks for the video but i am actually making a web app that detects fake social media acoounts so i am currently working on my ml model but for that i need good dataset so that i am able to train my ml model/ so how can i get all these information in csv file please tell me it would be very helpful for me. thanks

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

    Hi Justin, great video! Is there a way to count the number of views for all of the reels within an account?

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

      Not directly but you could loop over all and tally up views.

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

    How do I get Instagram public user's posts without their login? What type of develop app required and what APIs need to use? please guide me?

  • @SikanderKhan-lf5jn
    @SikanderKhan-lf5jn Рік тому +1

    Hey great video,
    Can you share the video link to get ig-user-id

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

    Dose it work on private accounts?

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

    Hi there! Do you know if you can use the Instagram Graph API to build an app for consumers? I understand that the documentation says the this API is intended for businesses and creators. I’m not interested in consumer media- I’m interested in various business account media so I know this is the right API to leverage. Just wondering if instagram would disallow that use case.

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

      Yeah you can access them as long as they are business account.

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

    hi justin, thanks for this great video, everything works just you outlined, is it possible to fetch view count with this endpoint, i could not figure aout it. I could not make the IG Media endpoint work, I get the unsupported get request error, am I missing sth with permissions and app review, also sould I use webhooks for reels and stories. thanks again

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

      I don't think it is possible with this endpoint. You need to use the media or insights endpoint with an actual access token for the specific user which means they would need to authenticate with your application so you can get a token for them.

  • @jamsshhayd
    @jamsshhayd 2 роки тому +4

    We'd really like to see how you requested the access and what permissions you needed to consume the APIs and Whether it is possible to get the access token silently without causing the user to go through the auth flow again.

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

      You can use the graph api explorer tool to select permissions and generate an access token for your app developers.facebook.com/tools/explorer/

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

      @@ytfeelslikenorthkorea I don't think this is possible through the api

    • @tapizquent
      @tapizquent 2 місяці тому

      ​@@justinstolpe Hey great video! Does the Facebook App need to be published in order to request these data through the explorer? I don't seem to find any of the permission you have such as instagram_basic, etc

    • @justinstolpe
      @justinstolpe  2 місяці тому

      @@tapizquent Make sure you have the product added in your app. You should be able to make calls to the api in the graph explorer even when you are in development mode.

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

    tried this method but im getting this error (#100) Tried accessing nonexisting field (business_discovery) on node type (User)

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

    How can i get, About Your Video(To find user ig)

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

    Hello Justin!! Great video :) :D Is it possible to get location, tags, and username of posts under a hashtag in insta using graph api too? i shied away from the api since it sounded like they restricted a lot since 2020... Thanks btw!! i learned a lot, more power to the channel

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

      does not look like it here is the documentation for insights on a media id developers.facebook.com/docs/instagram-api/reference/ig-media/insights

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

      @@justinstolpe ohhhh, ok thanks Justin! :D :D

  • @anthonylacey9830
    @anthonylacey9830 10 місяців тому +2

    Hey,
    That’s amazingly useful and love how ‘simply’ you demonstrated. I note this is for business accounts. Can you get ‘user_posts’ for Meta on personal accounts with the account owners permission. I know there is an API but it seems the access is only for ‘book of time line’ / parental / marketing analytics. Do you know if you can or how to?

    • @justinstolpe
      @justinstolpe  10 місяців тому +1

      Thanks! The api cannot be used on personal account, only business and creator accounts.

    • @anthonylacey9830
      @anthonylacey9830 10 місяців тому

      @@justinstolpe thanks for responding. Do you know any other services which can provide the same output?

    • @justinstolpe
      @justinstolpe  10 місяців тому

      @@anthonylacey9830 I don't know any

    • @LuufyZoro
      @LuufyZoro 2 місяці тому

      ​@justinstolpe How can I get the video in Arabic?

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

    trying to follow this guide, thanks for it btw!
    but would it be possible to do an array slice on to possibly limit the amount of posts like so?
    $output = array_slice($userInfo['business_discovery']['media']['data'], 0, 5);

  • @MaheepSingh-tn6xj
    @MaheepSingh-tn6xj 5 місяців тому

    Hi there, great tutorial! How can we download instagram dp of private insta accounts? Can you please guide me?

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

    Maybe this is a stupid question, but if I understand correctly both myself and the instagram I want to see the content of has to be a creator/business account?
    So how can I tell if the account I want to show the content of is a business account?

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

      Looks like you can check for error code of 10 possibly here is what I found on stack overflow stackoverflow.com/questions/57306647/is-there-a-way-to-tell-if-its-an-instagram-creator-or-business-account

  • @angelosguan6782
    @angelosguan6782 Рік тому +2

    Hello, is there a way using the instagram graph api to query the top most liked posts, say top 10 posts, for a given user id? Thank you for the content!

    • @adarshxd6274
      @adarshxd6274 5 місяців тому +1

      yes definitely, just get postids first. Now get the likes counts of these postids and make a top 10 priority queue or sort in descending order and take the first 10 postids.

  • @ArtiSingh-dx4vh
    @ArtiSingh-dx4vh 8 місяців тому

    Hi, do you mind showing us how did you pasted that userid(the very first entry) before putting that business query

    • @justinstolpe
      @justinstolpe  8 місяців тому

      Here is the video in my instagram graph api playlist for the user id ua-cam.com/video/Ry9UG_SfUS0/v-deo.html

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

    is there a way to post stories automatically when there a new row added in google sheets?

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

      no there is no way to post a story with the API

  • @realidadeinvestidor
    @realidadeinvestidor 7 місяців тому +1

    how are you Justin Stolpe? i speak from Brazil, first congratulations for the videos, it has helped me a lot in my developments related to the integration with graph instagram api, second, i would like your help to check if it is possible, from the caption of the media, i can get the accounts mentioned in the post, i saw that they appear in the json, in the "caption" field without the "@" in front, i would like to know how i can identify in the caption that a certain word is an instagram user mentioned, but without the "@". Thank you very much.

    • @justinstolpe
      @justinstolpe  7 місяців тому

      I think there is an option to request mentions with the data you get back.

    • @realidadeinvestidor
      @realidadeinvestidor 7 місяців тому

      do you know how I can do this?@@justinstolpe

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

    So does this download the posts to display them or just display the media hosted by IG?

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

      it displays the data directly from the API response

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

    Does this return every single post for a business account? For example, if an account has 5000 posts, will it return requested info for all 5000? Or is there some sort of limit? Thanks!

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

      No I think the default return in 25 but it does return a paging cursor which I believe can be used to get multiple pages but it requires another api call.

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

    What if i want to download post where user input the URL of the post? Any sort of help will be appriciated.

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

      Just going on a url you would probably need some sort of scraper to get the data out of the html. There is no api function that returns data if you pass in a url to a post.

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

    Could you save other peoples instagrams post? Can Instagram deny your access token for using other peoples posts?

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

      Once you get the data from the api you can decide what you want to do with it. I would think they would only deny an access token if you are spamming or using it against TOS.

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

    Hey Justin, Getting error when using username with "_" in them while creating post, Usernames without any supported special character works fine. How to get it done for usernames with special character?

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

      Not sure what error you are getting but I am able to get business discovery on usernames with an underscore

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

      @@justinstolpe Yes, Please check

  • @HB-dc8rr
    @HB-dc8rr 2 роки тому +1

    The “Meta” documentation is a rabbit hole and I haven’t been able to figure this out: can I pull media from any (public) instagram user? Or do I require certain permissions from them? Does that Instagram user need to have a Facebook Business page set up? Because I was looking at the “App Review Process” and one of the points mentioned that there should be Facebook SocialAuth visibly present in our application!

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

      you can pull with business_discovery any user that is a business account

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

      @@justinstolpe Can I do it with access token of my account or only with their? For example, I use endpoint, not my instagram ID and my access token to get data about this instagram account

  • @user-rb6sb1vu8b
    @user-rb6sb1vu8b 5 місяців тому +1

    iam getting this error while submitting the api "message": "(#100) Tried accessing nonexisting field (business_discovery) on node type (User)",

    • @justinstolpe
      @justinstolpe  5 місяців тому

      The IG account needs to be set as a business account and not personal to access business_discovery

    • @abishekradhakrishnan8334
      @abishekradhakrishnan8334 5 місяців тому

      @@justinstolpe I'm facing this error even in a business account

    • @creatorconnect
      @creatorconnect 2 місяці тому

      I got the same issue..why is that?

  • @mkwok621
    @mkwok621 3 місяці тому

    Hey! Thanks for this video! Do you know how to get instagram media id using shortcode or permalink of story or post published on instagram?

    • @justinstolpe
      @justinstolpe  3 місяці тому

      I don't think there is an endpoint for getting id from link

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

    All i want is, when the users enter the username, fetch from the Instagram API and display the profile picture. I think i can do this using basic display API. Should the users account to be business account? And any suggestion to do this? Thanks in advance.

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

      I don't think you can get the profile picutre url with the basic display api. But, for the graph api you can use the business discovery endpoint to query the api for a username.

  • @auronaft
    @auronaft 8 місяців тому

    Hey Justin! Do you know anything what about unavailable Test Users Facebook? Many people cant start own Apps

  • @user-ue3tb4iq2o
    @user-ue3tb4iq2o 8 місяців тому +1

    Can we use this item to get data from any public page?

    • @justinstolpe
      @justinstolpe  8 місяців тому

      the account need to be a business/creator ig account

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

    Hi Justine, Thank you for the detail tutorial, is there way to find follower count of normal profile ?

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

      if not a business account you can use the basic display api I believe

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

      @@justinstolpe Bad News Basic Display API not showing follower count, anyway thank for the tutorial and script

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

      @@santoshraut1508 looks like the basic display api does not return that

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

      @@justinstolpe Do you have any idea how to create a non-expiring key? I didn't find a way and facebook giving me key with expiry

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

      @@santoshraut1508 the longest you can get is a long lived access token but as long as users keep using it the expiry date will be reset to 60 days from when they use it.

  • @user-nq4fc2qi3k
    @user-nq4fc2qi3k 10 місяців тому

    can i extract this information from any instagram profile or just the ones i manage?

    • @justinstolpe
      @justinstolpe  10 місяців тому

      the accounts have to be business or creator and then you can use business discovery to get data

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

    Hi informative video,.. Can I grab the comments from the users post and post comments and replies to the post from our app?

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

      thanks! you can if you just need the user access token here is the wiki wher you can see comments nd replies github.com/jstolpe/instagram-graph-api-php-sdk/wiki

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

    Hi Justin,
    Can instagram basic api be used on business account? the requirement is just to fetch posts(read only) from a buisness account.

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

      yeah it can be used on business account but not personal

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

      @@justinstolpe i just realized the instagram basic api is not on the product list of business account

  • @user-gv7pp2kv5i
    @user-gv7pp2kv5i 2 роки тому +1

    hi justin, thanks for this great video, can you do a tutorial of making oEmbed Read Instagram?

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

      Thanks I will look into it and see what I can do.

    • @user-gv7pp2kv5i
      @user-gv7pp2kv5i 2 роки тому

      @@justinstolpe Could you explain please, why when i add to media(thumbnail_url) i got error

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

      @@user-gv7pp2kv5i for business discovery I believe thumbnail_url is not a valid field to request. You need to hit the media endpoint for that specific post to get thumbnail_url

  • @user-vm7xx3wi8cbz
    @user-vm7xx3wi8cbz 6 місяців тому

    Can you get user posts from business/creator accounts (via the API) WITHOUT their explicit approval/authorisation?

    • @tejasjani2544
      @tejasjani2544 Місяць тому

      Hi man, di you get answer of your question. I also want to do same thing. And doing research about it for last 1 week. Please reply it, if you got it

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

    where did you got the access token from ?

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

      check out my access tokens video ua-cam.com/video/_teASazXZ3s/v-deo.html

  • @charajaznao2829
    @charajaznao2829 11 місяців тому

    Hii, love your video, is there a way to get the stories from an account like this?

    • @justinstolpe
      @justinstolpe  10 місяців тому

      Yeah here is a link to the wiki github.com/jstolpe/instagram-graph-api-php-sdk/wiki/Stories

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

    Hi, I did a request in Java but it returned me that some permissions were missing. I read the documentation and they said that I needed instagram_basic, page_read_engagement and pages_show_list permissions. Apparently I need to give information about my company if I want to add these permissions to my app. But I don't have any company and i just want to create an app for trying.
    Is there any other methods to do it ?

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

      Yeah you can get access to these things if your app is in dev mode. Just make sure you have users set for the correct roles in the facebook apps dashboard.

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

      @@justinstolpe Thanks, do you know if there's an API for Instagram which allows to download videos from any Instagram account (even non business accounts) ?

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

      @@Elii1se no there is not an api for that

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

      @@Elii1se no there isn't

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

    Hii justin,
    It doesn't work for test user
    Error:- cannot be loaded due to missing permissions
    I want to create a screencast for app review for permissions like, Oembed_read,user_posts,user_likes but these permission are not working for test users

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

      I have not used test users so i am not exactly sure about them. You might need to use an actual account tied to a facebook page.

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

      @@justinstolpe
      Okay, Thanks for your reply

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

    Hey Justin,
    Thanks for the video. I keep getting an error "Unsupported get request, Cannot be loaded due to missing permissions. What should I do for the same?

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

      Thanks! That error means the access token you generated does not have the correct permissions so you probably need to create a new access token with the permissions required.

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

      @@justinstolpe alright thank you so much for your response. But I did follow your procedure from the beginning. And I then searched on stack overflow for the same issue. It came to my knowledge that I had to review my app as per policies. Is that necessary as I am trying this on my own and don't have a business?

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

      ​@@justinstolpe hey Justin. can you specify which permission that should be enabled before doing this?

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

      @@buatmaen2225 THe permissions in the vid should work. On your own you can use dev mode but as mentioned you need the app to go through facebooks review process for you to make the app in live mode or it won't work.

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

    ddoes this work for private profiles?Like if we want to get posts of people that we follow

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

      If you have an access token for their account I think it is possible.

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

    How to get api key? and if that is diff than acess token

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

      Check out this video ua-cam.com/video/qk8RAawrkhY/v-deo.html

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

    great tutorial, but unfortunately too much docs to read and we need a fb biz account

  • @amirmobarak6889
    @amirmobarak6889 10 місяців тому

    I dont know if you check these anymore, but im getting this error:
    {
    "error": {
    "message": "(#12) singular published story API is deprecated for versions v2.4 and higher",
    "type": "OAuthException",
    "code": 12,
    "fbtrace_id": "A3yGZT3HBQH0Fcn0C5LLwiy"
    }
    }
    any reason why?

    • @justinstolpe
      @justinstolpe  10 місяців тому

      yeah that is deprecated for the new api version

    • @amirmobarak6889
      @amirmobarak6889 10 місяців тому

      @@justinstolpe do you have a more updated tutorial or can point me in the right direction

    • @justinstolpe
      @justinstolpe  10 місяців тому

      @@amirmobarak6889yeah check out my instagram graph api playlist ua-cam.com/video/WpiJeVqNJQk/v-deo.html

  • @user-we4cf3uk8q
    @user-we4cf3uk8q 4 місяці тому

    Is it possible to post a URL with image to Instagram through API?

    • @justinstolpe
      @justinstolpe  4 місяці тому

      if you are posting an image you just need the image on a public server then you pass the URL to the API

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

    1:13 which video? You have many videos, i'm confused

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

      Here is the most recent one I have for it ua-cam.com/video/Ry9UG_SfUS0/v-deo.html hope it helps!

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

    how is this legal to be able to use and get other users photos and data and use it else where? isn't this copy right infringement?

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

      Well the user has to authorize your app in order for you to make api calls on their behalf and get their data.

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

    **Look at separate facebook login or App Review videos/docs

  • @rupalpatle6575
    @rupalpatle6575 3 місяці тому

    Does this also works for reels?

    • @justinstolpe
      @justinstolpe  3 місяці тому

      Have not tested but it should return in the data set

    • @rupalpatle6575
      @rupalpatle6575 3 місяці тому

      I couldn't do it. Probably because of the complex structure of the reels section.

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

    for me it works only for solo pictures (not videos, and carousels). Do someone has an idea of what's going on ?

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

      Check and make sure the fields you are requesting and it should return an array of children if the post is a carousel.

  • @AmeerHamza-cy6km
    @AmeerHamza-cy6km Рік тому

    where is video to get ig user id?

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

      here it is ua-cam.com/video/763kVf9fvqA/v-deo.html

  • @kpopper7514
    @kpopper7514 10 місяців тому

    Hey Justin, Can I also get 'the number of likes' and 'the number of comments' of other person's post?

    • @justinstolpe
      @justinstolpe  10 місяців тому

      yeah it should come back in the response as like_count and comment_count

  • @SamiSabirIdrissi
    @SamiSabirIdrissi 6 місяців тому

    Bro this php code makes head hurt

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

    can you hack my ex girlfriend's instagram account?

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

    hey. how to fetch other people story?

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

      here is the video I made on stories ua-cam.com/video/EmIFd4xbWnc/v-deo.html

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

      @@justinstolpe not my account story but target account story

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

      @@faysalahmed2619 you just need an access token for the target account. Checkout my access tokens tutorial on how to do it.

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

      @@justinstolpe can you make tutorial on this topic?

  • @chandanchaudhari704
    @chandanchaudhari704 9 місяців тому

    Still works in 2023?

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

    How to get views of video of user

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

      calling insights endpoint on the post can get you more details or I believe if it is a video you might be able to request video_views field.

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

    Hey I have used Instagram graph API buisness discovery endpoint but when I hit the url there was an error -
    "message": "(#10) Application does not have permission for this action"
    what permission i want to add.
    I have allow these permission -
    pages_show_list, instagram_basic, pages_read_engagement, public_profile
    Please help me

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

      Hey Justin, please help me

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

      @@amanjitmodak6905 Looks like the documentation says
      instagram_basic
      instagram_manage_insights
      pages_read_engagement or pages_show_list
      developers.facebook.com/docs/instagram-api/reference/ig-user/business_discovery

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

      Have you solved this problem? This happened with me too, and any permission is making it work. If you already solved this, please, share with me! Thanks.

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

      @@fx6373 Also make sure your account is the owner or admin of the facebook page

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

      @@justinstolpe These three/four permissions saved my day! I had been struggling get any access with the same error "(#10) Application does not have permission for this action" for days. Thanks for the tip!

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

    I am getting Tried accessing nonexisting field (business_discovery) on node type (User) error. My IG account is business account, and I have enabled all the permissions. Also enabled the Graph and Basic API. Your help will be greatly appreciated. I am trying for last couple days. Thanks

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

      Not exactly sure but you might need to double check your permissions on the access token you are using.

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

      @@justinstolpe getting same error, I have enabled all permissions & account is business as well. I think there is some major change in api's. It will be very helpful if you can check and update us.

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

      @@redecormyhome4335 I would test out your tokens and user ids in the facebook graph explorer so you can debug it. TI am not aware of any major breaking changes as the demo link for my code is still working.

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

      @@justinstolpe Finally I got it working. But there is only 1 issue. For some accounts, all fields EXCEPT like count show up. I tested with 8 different creator and business accounts. For 6 of them, all data including like count shows up. For 2 other accounts, all data except like count shows up. What's going on? Could you help.
      By the way, thanks a lot for such a helpful tutorial I just hit the like button. Cheers

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

      @@mridul7200 How its working? I got same error too, and still stuck until now

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

    How to get comments on each media returned using business_discovery?

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

    Hey Justin, can you do a tutorial of making Instagram Direct Message by using the Instagram Graph API?
    Thanks for the all Instagram Graph API Tutorial
    You are awesome

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

      Thanks! I will check it out and see if the API can do it.

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

      @@justinstolpe Thanks a lot Justin

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

    only get "type": "OAuthException",
    "code": 100,

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

    What
    $pageId = 'YOUR-PAGE-ID'?
    $accessToken = 'YOUR-ACCESS-TOKEN-HERE' from IG or FB?

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

      Facebook Page ID and access token also but make sure you have the right permissions. Check out my access tokens video for more info.