fb-ads-plugin-sdk
v1.1.1
Published
Create plugins for Facebook Ads Manager.
Downloads
10
Readme
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;