Famobi for Publishers

1. Mobile redirect technique using JavaScript
Redirect your mobile traffic to a different domain, and tell search engine bots – like Google, Bing, Yahoo! – about it:

<script src="http://games.cdn.famobi.com/html5games/plugins/detection.js"></script>
<script>
  if (detection.is.smartphone || detection.is.tablet) {
    var url = 'http://m.[yourdomain].com/'; // <<< change to your domain!
    window.top.location = url;
  }
</script>
<link rel="alternate" 
    media="only screen and (max-width: 640px)" 
    href="http://m.[yourdomain].com/"><!-- <<< change to your domain! -->

Copy the above JavaScript code snippet to your websites <head> section or place it anywhere on the page. Don't forget to replace "m.yourdomain.com" with your mobile portal domain.

2. JSON Feed
If you have an own website and want to import our games programmatically, we offer a JSON Feed with all our games:

Base URL
http://api.famobi.com/feed
Parameters
a
Your Affiliate ID. Example: a=A-YOURID — Required
Incoming traffic will not be accounted to you when missing.
Don't have an Affiliate ID yet? Register here.
URL example: http://api.famobi.com/feed?a=A-YOURID
n
Number of entries (Limit), Example: n=100 — Optional
URL example: http://api.famobi.com/feed?a=A-YOURID&n=100
skip
Number of entries to be skipped (Offset), Example: skip=20 — Optional
URL example: http://api.famobi.com/feed?a=A-YOURID&n=40&skip=20
sort
Sorting method, will return entries ordered by number of game plays (top_games) or chronologically (default). Example: sort=top_games— Optional
URL example: http://api.famobi.com/feed?a=A-YOURID&sort=top_games
channel
Channel. Example: channel=arcade,bubble-shooter — Optional
May be one of the categories specified in the feed and per each game. Filters all games for the given channel/category
locale
Locale. Example: locale=de_DE — Optional
Switches all the game names and descriptions to German.
Supported locales: de_DE, en_US, tr_TR
Final URL example
http://api.famobi.com/feed?a=A-YOURID&n=100&channel=arcade,bubble-shooter

Example

http://api.famobi.com/feed?a=A-YOURID&n=100

This feed is written in the JSON data format and contains the latest games with the following fields:

categories
Array — All categories contained in the list, e.g. for navigation purposes
games
Array — All games in this feed, each item with the following data:
package_id
String — Identifier for this game.
orientation
String — Preferred device orientation on mobile.portrait|landscape|none
name
String — Game title.
description
String — Short description.
thumb
String — Preview image. May be used on your site as well.
link
String — Link to this game, including your Affiliate ID if provided (and valid).
date
Date — Publish date.
categories
Array — Categories / Channels this game belongs to.

3. Publisher SDK

Insert the SDK on your page to prevent issues with third-party cookies and localStorage:
<script src="//games.cdn.famobi.com/html5games/plugins/famobi_sdk.js"></script>
Comments