How to Put AdSense Code in Facebook

How to Put AdSense Code in Facebook

Create Code and HTML File
Step 1

Log in to your Google AdSense (adsense.google.com) account.

Step 2

Click the “My Ads” tab and click “New Ad Unit” to generate a new ad code connected to your AdSense account.

Step 3

Edit and customize size and display settings on your ad by tweaking the settings Google AdSense offers, and then click “Save and Get Code.”

Step 4

Copy the code and paste it into a new or previously created HTML file of your app or Web page. Paste the AdSense JavaScript code into the section of your HTML code where you wish the ad to be displayed. Save this HTML file to your Web server and copy its URL.



Facebook Implementation
Step 1

Log in to your Facebook Developer (developers.facebook.com) account and click “Set Up New App” from the top right corner of the window.

Step 2

Write a name for your application, accept Facebook’s terms and conditions, and then confirm your developer account with either your linked credit card or mobile phone.

Step 3

Fill the new application form with your app’s name, the intended use and category, and then click “Save Changes.”

Step 4

Click “Facebook Integration” and fill out the required fields. Copy the URL from your HTML file that contains the AdSense code and paste it into the Canvas URL field. This directs your Facebook app to your AdSense code.

Step 5

Click “View App Profile Page” then click “Add to my page” and choose which pages you would like to add the Facebook app to. Click “Close.” Return to your app’s homepage and verify the AdSense ads are displayed.



2019-11-23T07:29:52+00:00