Video není dostupné.
Omlouváme se.

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

Sdílet
Vložit
  • čas přidán 17. 08. 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.co...
    Some links and references:
    - developers.fac...
    - Documentation: / reference
    #facebookads #facebookadsapi #facebookmarketingapi #performancemarketing #scripting

Komentáře • 92

  • @bambanx
    @bambanx Před 9 dny

    Thanks for the video is still valid in 2024

  • @rrenpai
    @rrenpai Před 3 lety +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 Před 3 lety +2

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

  • @JacWilliamsVideo
    @JacWilliamsVideo Před rokem

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

  • @LaureanVincent5
    @LaureanVincent5 Před 3 lety +2

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

  • @user-bo2xl8qm6q
    @user-bo2xl8qm6q Před 7 měsíci +1

    Thanks! I hope you keep doing new tutorials.

  • @joecristian5274
    @joecristian5274 Před 2 lety

    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

  • @rahulrishi3071
    @rahulrishi3071 Před 4 lety +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  Před 3 lety +1

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

    • @rrenpai
      @rrenpai Před 3 lety

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

  • @RaihoSan
    @RaihoSan Před 3 lety +4

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

    • @sophiophile
      @sophiophile Před 2 lety

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

  • @ahmadmails
    @ahmadmails Před 3 lety

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

  • @rEsXVI
    @rEsXVI Před 3 lety +2

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

  • @marekbednar1265
    @marekbednar1265 Před rokem +1

    Insanely valuable. Thank you!

  • @evanjoyal9540
    @evanjoyal9540 Před 19 dny

    How can i get ads back from the api just like the search page? like just calling the api and getting back all recent ads from all brands.

  • @DimitrisPaxinos
    @DimitrisPaxinos Před 6 měsíci +1

    This is amazingly helpful. Thank you!

  • @lucasvanwyk9408
    @lucasvanwyk9408 Před 2 lety +1

    Many thanks, exactly what I was looking for!

  • @niccolo_defendi_cho
    @niccolo_defendi_cho Před 18 dny

    Hey. can you only get this data for your own acocunts or can you put in anyones id/username and try to get this to work.

  • @hrikrdo369
    @hrikrdo369 Před 3 lety +1

    Thanks brother for share your knowledge with others.

  • @gopikishan206
    @gopikishan206 Před rokem +1

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

  • @INRamos13
    @INRamos13 Před 3 měsíci

    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.

  • @gonzaloperales1086
    @gonzaloperales1086 Před 4 lety +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

  • @wigsmile2183
    @wigsmile2183 Před 3 lety +2

    thanks man, its so helpful!

  • @sachinsingh333
    @sachinsingh333 Před měsícem

    Thanks a lot !

    • @simonsalasseeber5517
      @simonsalasseeber5517 Před 27 dny

      bro did this actually help you? i see that in v20.0 this does not work. maybe because my business instagram account is not verified and now that seems to be a requisite. did you make it work?

  • @user-de5qj9jd2n
    @user-de5qj9jd2n Před 9 měsíci

    Is there any way to create ad account without payment process

  • @user-xz8hq2qz8c
    @user-xz8hq2qz8c Před 11 měsíci

    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

  • @madurangaweda86
    @madurangaweda86 Před rokem

    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

  • @minhquangduongthai9784
    @minhquangduongthai9784 Před rokem +1

    love your content so much

  • @laikhandigitalmarketer5256

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

  • @f88vietnam
    @f88vietnam Před 6 měsíci

    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.

  • @avinashsrivastav4947
    @avinashsrivastav4947 Před 3 lety

    Awesome tutorial. Thanks!!

  • @WillFawthrop
    @WillFawthrop Před rokem

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

  • @RifqiFarhan-xu6jo
    @RifqiFarhan-xu6jo Před rokem

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

  • @allisonnims351
    @allisonnims351 Před 8 měsíci

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

  • @IsfhanAhmed
    @IsfhanAhmed Před 7 měsíci

    Thanks for this video it is helping me so much.

  • @brunoaksenen
    @brunoaksenen Před rokem

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

  • @christianaguirrebroncano3057

    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  Před 4 měsíci

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

  • @MyPauljames
    @MyPauljames Před 3 lety

    Thanks much for the video. Very helpful!.

  • @helloworld7752
    @helloworld7752 Před rokem

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

  • @MaxwellRios
    @MaxwellRios Před rokem

    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?

  • @oleksandroleksandr2774
    @oleksandroleksandr2774 Před 3 lety +1

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

    • @kitchnio
      @kitchnio  Před 3 lety

      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.

  • @sgkrasts
    @sgkrasts Před 2 lety

    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?

  • @brunolopes6200
    @brunolopes6200 Před 4 lety +1

    perfect! great job!

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

  • @nosticx8025
    @nosticx8025 Před 2 lety

    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  Před 2 lety

      Hi! What endpoint are you trying to call?

  • @ssyedyaseens
    @ssyedyaseens Před 2 lety

    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  Před 2 lety

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

  • @rajeshsah6865
    @rajeshsah6865 Před 4 lety

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

  • @avinashsrivastav4947
    @avinashsrivastav4947 Před 3 lety

    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  Před 2 lety

      What conversion specifically?

  • @mohamedmorsi-me9ee
    @mohamedmorsi-me9ee Před rokem

    the best

  • @eunusmondal
    @eunusmondal Před 3 lety

    Hi bro I need ur help to breakdown actions?

  • @aidananderson9469
    @aidananderson9469 Před 2 lety

    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  Před 2 lety +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

  • @LamTran-mz7lp
    @LamTran-mz7lp Před 4 lety

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

  • @prophet78653
    @prophet78653 Před 2 lety

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

  • @schiapu
    @schiapu Před 3 lety

    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  Před 3 lety +1

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

    • @schiapu
      @schiapu Před 3 lety +1

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

  • @dorb1337
    @dorb1337 Před 2 lety

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

    • @kitchnio
      @kitchnio  Před 2 lety +1

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

  • @FlorenzErstling
    @FlorenzErstling Před 4 lety

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

    • @simonkreienbaum934
      @simonkreienbaum934 Před 4 lety

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

  • @joselitoalowa6898
    @joselitoalowa6898 Před 4 měsíci

    how can we get the facebook followers each day?

  • @abhishekreddy7987
    @abhishekreddy7987 Před 3 lety

    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  Před 3 lety

      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

  • @infomantryplus6235
    @infomantryplus6235 Před 4 lety

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

    • @kitchnio
      @kitchnio  Před 4 lety +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.

  • @NordwestOficial
    @NordwestOficial Před rokem

    Like in Brazil

  • @mehdiyahiacherif2326
    @mehdiyahiacherif2326 Před 3 lety

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

    • @kitchnio
      @kitchnio  Před 3 lety +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 Před 3 lety

      @@kitchnio Awaiting the video. Thanks!

  • @matematicacomgosto2328

    lengend in portugês (Brasil) please

  • @rickrandazzo
    @rickrandazzo Před rokem

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