Giter Club home page Giter Club logo

fbrads's Introduction

fbRads

This R package includes wrapper functions around the Facebook Marketing API to create, read, update and delete custom audiences, images, campaigns, adsets, ads and related content.

For more details, see the slides presented at useR! 2015, EARL 2015, the Los Angeles R Users Group and at a Domino Webinar.

Creating a Facebook App & connect with OAuth token

To be able to use this package, you will have to create a Facebook App and authorize it to manage your Facebook ads. Basic steps to create an app with Development access level letting you manage up to 5 Facebook ad accounts:

  1. Click on "Add a New App" at https://developers.facebook.com/apps

  2. Fill in a unique Display Name (eg "app_testing_foobar_42"), and provide your e-mail address. Click on "Create App ID" & pass the captcha test.

  3. Select the "Implement Marketing API" scenario that will automatically add the "Marketing API" to the "Products" section of the sidebar, or click on the "+" butting in the "Products" section of the sidebar

  4. Optionally associate your app with a Business Manager in the "Settings" screen of the "Marketing API"

  5. In the sidebar, select "Tools" from the "Marketing API" and generate a token

  6. Store your token in a secure place, and you are all set to start using fbRads, eg list all the Ad Account ids you can access:

    accounts <- fbad_get_my_ad_accounts(token)
  7. Pick an Ad Account id from the returned list and initialize fbRads to use that Ad Account by default:

    account <- sample(accounts$account_id, 1)
    fbad_init(accountid = account, token = token)
  8. Then list all your ads along with the ad name and status on that Ad Account:

    fbad_list_ad(fields = c('name', 'effective_status'))
  9. Or eg filter for the active ads:

    fbad_list_ad(statuses = 'ACTIVE', fields = 'name')

Development version

The package is actively maintained, but not frequently pushed to CRAN, so to use the most recent version, install from GitHub. The master branch is supposed to include a relatively stable version at all the time:

devtools::install_github('daroczig/fbRads')

Using the package

This package makes your life more convenient when it comes to interacting with the Facebook Marketing API, but unfortunately, it cannot save you the time to get familiar with the actual API endpoints. To be able to interact with Facebook, you have to learn about how the API works etc -- see the documentation at https://developers.facebook.com/docs/marketing-apis


This package was originally developed at CARD.com, currently maintained at System1 -- licensed under AGPL-3.

fbrads's People

Contributors

daroczig avatar arbenkqiku avatar bjeavons avatar baobaofzhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.