Skip to content

Commit

Permalink
Update facebook-ads.md to be more accurate (#3331)
Browse files Browse the repository at this point in the history
Based on the code, it looks like you need to include both AdMediaView and AdIconView to be able to trigger the ad.  Updated the "Note" and modified the code example to demonstrate that.
  • Loading branch information
stevenpal authored and ide committed Jan 25, 2019
1 parent 199547f commit 65a6d35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/versions/v32.0.0/sdk/facebook-ads.md
Expand Up @@ -123,17 +123,18 @@ export default FacebookAds.withNativeAd(AdComponent);

#### 4. Mark which components trigger the ad

> ** Note:** In order for elements wrapped with `AdTriggerView` to trigger the ad, you also must include `AdMediaView` in the children tree.
> ** Note:** In order for elements wrapped with `AdTriggerView` to trigger the ad, you also must include `AdMediaView` and `AdIconView` in the children tree.
```js
import { FacebookAds } from 'expo';
const { AdTriggerView, AdMediaView } = FacebookAds;
const { AdTriggerView, AdMediaView, AdIconView } = FacebookAds;

class AdComponent extends React.Component {
render() {
return (
<View>
<AdMediaView />
<AdIconView />
<AdTriggerView>
<Text>{this.props.nativeAd.bodyText}</Text>
</AdTriggerView>
Expand Down

0 comments on commit 65a6d35

Please sign in to comment.