How to monetize my facebook canvas game?

Hey guys, as the title says, I am looking for a good tutorial on how to implement ads in my unity webplayer game on facebook. I’ve seen lots of stuff for mobile apps but none for canvas. I’d like to use ad4games as the adprovider because its facebook aprooved and I saw many other facebook games using it. The main problem is, that I am using the Facebook SDK and have no option to edit the html file because only the unit3d.build will be loaded by facebook.
Does anyone have any experience with this?

I’ve been looking for this for a while. Using the Facebook-Unity integration it is difficult if not impossible. Most ad severs require HTML with the script tag to be on the webpage. For security reasons modern browsers will not run scripts that are injected in. So Application.ExternalEval is a dead end.

You best bet is to forgo the Facebook-Unity integration and build your own HTML with the ads and the webplayer embedded. Then direct your Facebook app to the HTML code.

I’m personally just about fed up with trying to get Facebook to play nice. There whole set up is not very developer friendly. For instance there will be Facebook ads placed next to your game, but you don’t get a cent of their revenue. They also don’t allow you to use google ads, which is pretty much industry standard. Then there are the various rounds of permission to get anything posted on Facebook. The SDK is poorly documented. It won’t run unless you are on canvas (effectively locking your game in). The data from the open graph is relatively difficult to interpret.

For the moment I’m looking into game portals as a better option. I can always go back to Facebook if the game has any level of success.

Hi there,

I just managed to inject an ad from appnext below unity game in facebook canvas. I am using unity integration. It is working. Just first test the javascript in a simple web page and once you are sure the javascript is able to inject the ad into the web page then do it in unity with Application.ExternalEval.

Now I need to find a way to get reward ads in unity :slight_smile: