fb-ads-plugin-sdk

1.1.1 • Public • Published

Usage

$ npx create-react-app my-fb-ads-plugin
$ cd my-fb-ads-plugin
$ npm install fb-ads-plugin-sdk
$ npm start

Example App.js:

import React from 'react';
import {
  APButton,
  APContainer,
  APIntroduction,
  APSDK,
  APSection,
} from 'fb-ads-plugin-sdk';

const videoId = APSDK.getQueryParam("video_id");

function App() {
  return (
    <APContainer>
      <APSection location="AD_CREATIVE_EDIT">
        <APIntroduction text="My Facebook ads plugin" />
        <APButton
          onClick={
            () =>
              APSDK.openDialog(
                `https://example.com/?video_id=${videoId}`,
                {"width": 1000, "height": 1000},
              )
          }
          label="Open Example Dialog"
        />
      </APSection>
    </APContainer>
  );
}

export default App;

Package Sidebar

Install

npm i fb-ads-plugin-sdk

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

44.1 kB

Total Files

4

Last publish

Collaborators

  • joshuawu
  • travisnewgren