0.1.5 • Published 7 years ago

react-native-facebook-instream-ads v0.1.5

Weekly downloads
11
License
MIT
Repository
github
Last release
7 years ago

Facebook InStream Ads

Installation

1. Install Javascript packages

$ yarn add react-native-facebook-instream-ads

Link to your project

$ react-native link react-native-facebook-instream-ads

2. Downloading and linking the native Facebook SDK for iOS

Follow all the steps in the Getting Started Guide for Facebook SDK for iOS.

Usage

import { InStreamView } from 'react-native-facebook-instream-ads'
export default class Example extends Component {

  handleSuccess = () => {
    //Handle when Ads loaded
  }

  handleError = () => {
    //Handle when Ads had err
  }

  render() {
    return (
      <View style={styles.container}>
        <InStreamView
          style={//Optional.}
          placementId={"your-placement-id"}
          onAdDone={() => this.handleSuccess()}
          onAdError={() => this.handleError()}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});
0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago