Facebook API Tutorial: Graph API, Access Token and Developer Documentation Explained

Поділитися
Вставка
  • Опубліковано 5 лип 2024
  • Want to optimize your paid social processes with Facebook ads automation? Then learn how to build on top of Facebook API with a simple tutorial from Kitchn.io! In this follow-along tutorial, you will learn how to get an access token, do your first Graph API call with Graph API Explorer, and export the campaign data of your ad accounts.
    If you want to work with the Facebook API but do NOT want to go through technical documentation or handle authentication yourself, check out Kitchn.io.
    kitchn.io/start
    Timecodes:
    00:00 - Intro
    05:15 - Webinar starts
    06:48 - Agenda
    07:43 - Create a Facebook App
    10:00 - Get an Access Token
    15:00 - Developer Documentation: objects, edges, and params explained
    17:45 - Graph API Explorer: First API Call
    19:40 - Get ad accounts data
    22:40 - Access one specific ad account
    26:00 - Retrieve "insights", i.e. campaign data of your ad accounts
    31:10 - Retrieve campaigns of ad account & play around with it
    32:20 - Retrieve adsets of the campaign
    32:48 - Retrieve and then change daily_budget
    36:30 - Retrieve ads of adset
    39:20 - Get ad creative and more insights about an ad
    43:45 - Move out of Graph API Explorer and retrieve information with just a browser
    48:30 - End
    Link to slides: docs.google.com/presentation/...
    Some links and references:
    - developers.facebook.com
    - Documentation: / reference
    #facebookads #facebookadsapi #facebookmarketingapi #performancemarketing #scripting

КОМЕНТАРІ • 93

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

    This tutorial is AWESOME!!!! Been searching everywhere for just what you demonstrated. Thanks for taking the time to do this.

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

    Watching this 3 years on - thanks so much Simon. This has saved me a lot of money having to outsource this to someone.

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

    Amazing walkthrough, answered all my questions and taught me some new tricks

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

    Insanely valuable. Thank you!

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

    Thanks brother for share your knowledge with others.

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

    Awesome tutorial. Thanks!!

  • @rrenpai
    @rrenpai 3 роки тому +6

    This is actually gold. Now I just need to creat every single freaking request I need and move it to postman for our actual developer

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

      Postman is prob very overkill. Your developer may simply use the facebook SDK.

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

    Many thanks, exactly what I was looking for!

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

    thanks man, its so helpful!

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

    Thanks much for the video. Very helpful!.

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

      Glad it was helpful!

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

    Thanks! I hope you keep doing new tutorials.

  • @rahulrishi3071
    @rahulrishi3071 4 роки тому +10

    Great Job! Would be great if you can give tutorials of the API's of other sites too like Google Analytics, Google Ads etc. Waiting for further great content from you :)

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

      Noted! Just the authentication part is much harder on Google products IMO, but will definitely get to it eventually! :)

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

      @@kitchnio preferably native (taboola and Outbrain) cause their dashboards suck! They always have a delay and this wouldn't be the case if I could pull the data via API.

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

    This solved all the mystery about Marketing API. Thank you very much for uploading the video.

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

    This is amazingly helpful. Thank you!

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

      Glad it was helpful!

  • @brunolopes6200
    @brunolopes6200 4 роки тому +1

    perfect! great job!

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

    love your content so much

  • @laikhandigitalmarketer5256
    @laikhandigitalmarketer5256 4 роки тому

    Thank you i am marketer who do not know coding... thank you very much agenda is liked

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

      You are most welcome

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

    Thank you for creating this (and the one about pulling the data into google sheets) both were very clear and helpful! I need to pull in # of purchases and landing page views to my google sheet can you tell me how to do that? Oh, and is there a way to get the most recent data on top?

  • @RaihoSan
    @RaihoSan 3 роки тому +4

    Thank you very much. I need to up my game into api because thats where the future is.

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

      The past was using APIs as well. Hope youved up your game.

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

    Great walkthrough! Thanks a lot. I am trying to do this via python, if you have additional resources that would be super helpful.

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

      Glad it was helpful! We'll be pushing out more content soon!

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

    Wow very informative video.Sir please make a video on Facebook Catalogue Batch API.

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

    First thank you very much for the video.
    But when I add adaccount in graph api, it doesn't let me click submit and I click to generate token and I get that I need permissions.
    Do I have to request permissions for ads_read and ads_management?
    NOTE : I found the mistake, I didn't generate token in the tool's page when you selected ads_read, ads_management, read_insights

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

    i spend hours figuring out how to connect facebook ads api to my dashboard apps and have no reslut. Really thanks for this i cant believe its actually really easy

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

    Amazing! Thank you so much! where I can join this webinar in the future? You have a Udemy course?

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

    Thanks for this video it is helping me so much.

    • @kitchnio
      @kitchnio  2 місяці тому +1

      Glad it helped!

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

    Hi, Simon! Thank you for the video. It's the third time i am here.
    I have a problem. I want to get the "Page Name" level but it is not available. only ad, adset, campaign, account levels are available.
    Do you know an alternative to get this "Page Name" or "Page ID" since Graph API? Thank you!

  • @RifqiFarhan-xu6jo
    @RifqiFarhan-xu6jo Рік тому

    Hi, do you know how to call the API for the multiple ad-account or cross-account report?

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

    2:50 gratidão pela oportunidade avanco social vocês são os melhores para as redes sociais

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

    Thank you, this is really helpful. I was wondering, is there a way to send an image for the ad through the API?

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

      Thanks! Just to clarify, you are trying to replace the image of an existing ad via API?

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

      @@kitchnio Thanks for answering, I did a bunch of tests and found out how to send the base64 bytes through Postman

  • @rajeshsah6865
    @rajeshsah6865 4 роки тому

    Thankyou for sharing it. I wanted to merge facebook ad data with google analytic for firebase data. Can you share some resources for it.

  • @mohamedmorsi-me9ee
    @mohamedmorsi-me9ee Рік тому

    the best

  • @LamTran-mz7lp
    @LamTran-mz7lp 4 роки тому

    Thank you very much for video
    Can you share how to post video and images on profile and fanpage by using fb api?

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

    Does this same API work for Instagram? Yesterday I ran several tests and couldn't retrieve the RTMP address for IG to do live streaming using OBS Studio. However, I had no issues doing the same for Facebook. In summary, can you start a live stream on Instagram using the Graph API?

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

    Hey man, greath job!
    How can i filter the "actions"? I need only landing page views, for example

  • @user-xz8hq2qz8c
    @user-xz8hq2qz8c 9 місяців тому

    I'd be great to shave a short intro for how this is useful for real usecases before jumping it to the nitty gritty. Grate vid though. Thanks

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

    Hi. Great video.
    How to query fb to get a list of campaigns and their insights with fields?
    Thanks.

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

      Thank you! You can add fields as a nested argument when querying an "edge".
      The normal API call would be simply:
      /act_/campaigns?fields=insights
      But this will return the default value of insights, which is spend and impressions for the last 30 days.
      To add further fields, e.g. "actions", you can use curly brackets:
      /act_{account_id}/campaigns?fields=insights{spend,impressions,actions}
      To change other parameters you would use .(), so:
      /act_{account_id}/campaigns?fields=insights.date_preset(last_year){spend,impressions,actions}
      if instead of the default "last_30d", you'd want to use "last_year" for the "date_preset" setting.

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

    Hey, quick question: how applicable is this to the current Meta Marketing API? Is it all the same, or have any of these steps significantly changed? Apart from just UI changes of course.

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

    Hi! I just want to learn your tutorials and they are so valuable and but I could not able to process your get access token because its does not appear public_profile on the permission dropdown list. Please Help me to resolve that

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

    Could you assist me in retrieving the DDA results? The results for my work are currently empty, and I'm unsure how to resolve this issue.

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

    How many of these data points are still valid with iOS's recent pixel blocking/tracking techniques?

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

    Hi bro I need ur help to breakdown actions?

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

    Good video..just wondering can all this be automated with Python ?

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

    Hey, Is it possible to pull amount spent at an adid level from graph api. I need this level of granularity for my use case.Any help is much much appreciated! Thanks in advance!
    Also I really like your content. I have subscribed to your channel!

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

      Thank you!
      Of course. For example the following would get you spend, ad name and ad id for the whole account over the last 7 days broken down by day.
      /act_/insights?level=ad&fields=spend,ad_name,ad_id&date_preset=last_7d&time_increment=1

  • @user-de5qj9jd2n
    @user-de5qj9jd2n 8 місяців тому

    Is there any way to create ad account without payment process

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

    Could you please help me to pullout the conversion metrics? Tried using Marketing API fields but as it's not a numeric field, it's not working.

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

      What conversion specifically?

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

    Hey there Simon,
    whenever I try to test out the Api using the GraphApiExplorer I get this error: "(#100) Missing permissions".
    I have generated a token with the ads_management and the ads_read permissions so I do not understand why this is happening. Am I missing something?

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

      Hi! What endpoint are you trying to call?

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

    Like in Brazil

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

    Maybe I'm missing something, but how do you deal with the access token expiring? If I want these reports in a google sheet to be fully automated, how do you make sure it can run without needing to go in every two hours to get a new access token?

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

      Hi Aidan, we're about to record a video on it! If you don't want to wait for the video, check out Facebook's documentation: developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived

  • @FlorenzErstling
    @FlorenzErstling 4 роки тому

    hey, is it possible to manage all my ads without an official app review?

    • @simonkreienbaum934
      @simonkreienbaum934 4 роки тому

      For an internal app, you don't need publish the app, so no need for a review.

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

    How can I get the data segment by campaign if I have many adaccounts? I want to select it with a range time btw, I tried but it doesn't work. Please! I need help

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

      Please share what you tried exactly and I might be able to help.

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

    what is the use of this access token can you elaborate am new about it

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

      The access token is the equivalent to your username + password that you need to login into your Facebook (ads) account. So the access token identifies and authorizes you when accessing Facebook (ads) via API.

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

    hello sir, jus a question , how can i get the facebook leads with this api , great video btw

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

      We will probably make another video on that but it's not so straight-forward unfortunately. Using Zapier for Lead Ads might be a good starting point, though?

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

      @@kitchnio Awaiting the video. Thanks!

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

    Is it still up to date ? didn't they change their APIs at 2022?

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

      Some things have changed, of course. Lots of things are the same, though! :)
      developers.facebook.com/docs/graph-api/changelog

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

    lengend in portugês (Brasil) please

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

    how can we get the facebook followers each day?

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

    Seems to be outdated? Nothing looks like this.... Sorry....