Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
In FB instant, ads are loading but not showing in Android — Gideros Forum

In FB instant, ads are loading but not showing in Android

I'm trying to implement ads in a fb instant game. The ads are showing up in the desktop browser version of the instant game but no ad shows up in the android instant version. Since I'm using text messages to indicate when the ads are loaded and then shown, I can tell that the ads are loading and showing. But no ad appears onscreen. What could the problem be?
Thanks.
Tagged:

Comments

  • hgy29hgy29 Maintainer
    What error code do you get from the loadAd/showAd callbacks ?
  • That's the thing. I'm not getting any error code. When I click the button "get 2x", I get the text "ad shown" but no ad. With the same code on the desktop browser I get an ad. image
    Screenshot_2019-09-09-22-03-50-65.png
    1080 x 2160 - 117K
  • hgy29hgy29 Maintainer
    I was about to post a link to the doc here, just to find out that FBInstant ads aren’t properly documented on gideros wiki. Anyhow when you call loadAsync on your ad object, the callback you give will be called with the result as first argument and and error code as second argument. You can and you should use the error code to distinguish among various issues that may arise with FB ads, such as NO_FILL, FREQUENT_LOADS, etc.
  • @hgy29 Thanks. I'll do that now to see if the error code helps find the problem. In the meantime, I found out that ads work when I play the game on the browser on the android phone. So it's when the game is played on the messenger app, that's when the ads don't show.
  • pm1891pm1891 Member
    edited September 2019
    @hgy29 So tried printing out the error code. In desktop browser game( with ad showing), the error is printing out as true while in the android messenger version (without ad), the error is printing out as false. This is the code I'm using-
    mydata.advertInterstitial:showAsync( function (result, error) -- show the reward advert stored
                                                     ----in the global  mydata.advertInterstitial
            print("Reward advert watched!")
    	if result then
    	        local text = TextField.new(mydata.font1, "ad shown")
    		stage:addChild(text)		
                    text:setPosition(150,250)
    	end
    	local text = TextField.new(mydata.font1, tostring(error))
    	stage:addChild(text)
    	text:setPosition(150,350)
     
    end)
  • hgy29hgy29 Maintainer
    Looks like the result is the second arg and the error would be the third then, sorry I was responding from my memory. The first arg is probably the ad instance itself.
Sign In or Register to comment.