Problem With Facebook Auidience Network ads for mobile

Posted in: Newsmag
Post count: 83

I put the code in the “Top Article” and “Bottom Article” section of ADS in theme panel, and close the desktop view but in desktop it shows me and empty space…

Can anyone out there help me with that…

You can see the problem from : http://sonsoz.com.tr/gazetecilere-destek-ha/

I want to remove the white spaces in Desktop and view the adds on mobile…

The code I put in:

  <script>
      window.fbAsyncInit = function() {
        FB.Event.subscribe(
          'ad.loaded',
          function(placementId) {
            console.log('Audience Network ad loaded');
          }
        );
        FB.Event.subscribe(
          'ad.error',
          function(errorCode, errorMessage, placementId) {
            console.log('Audience Network error (' + errorCode + ') ' + errorMessage);
          }
        );
      };
      (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk/xfbml.ad.js#xfbml=1&version=v2.5&appId=----------------";
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));
    </script>
    <fb:ad placementid="--------------------------" format="300x250" testmode="false"></fb:ad> 

The Sections with ————- are the numbers for my appid and addid so no need for them … 🙂

  • This topic was modified 10 years by Smanchi.
Post count: 83

By the way ads work great in Mobile only have problem with Desktop view…

Post count: 6535

Hi

Try this css in theme panel > custom code > custom css: http://screencast.com/t/sN3crPJ5foX

@media(min-width: 768px){
.td-a-rec-id-content_top{
display: none;
}
}

Note that the disable option from theme panel works only for ad-sense code, for others ad types that option will not be applied.

Thanks!

Post count: 83

SOLVED and THNX TONS…

  • This reply was modified 10 years by Smanchi.
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.