Would you like to add a Sofanatics Stadium to your website? Would you like to give your users a possibility to meet on your site during the matches?
Sofanatics provides an API to embed the Sofanatics Stadium on any external website. Embedding Sofanatics is fast and easy.
Your Stadium will be connected to the whole Sofanatics network. You will see users from Sofanatics.com and all the embeds, so there will be lots of action on your page.
Please note that if you intend on using our API on a site with more than 25.000 monthly visits, you should contact us first. Otherwise just go ahead!
The embedded Stadiums are always open, there is no activation limits for the teams. That way also the supporters of smaller teams can enjoy Sofanatics!
You should not use more than one embed on a single web page.
To use the API, you must first add this script within the body of your HTML page.
<script src="http://cf1.sofanatics.com/embed/js/api/v1.js" type="text/javascript"></script>
To embed the next match (or match that is currently being played) of a specific team, use the nextMatchForTeam-method:
sofanaticsEmbedApi.nextMatchForTeam(teamId, width, height)
Replace the teamId with the ID of the team and the width and height with the size (in pixels) at which you want to embed the match.
Here are the ID's of the most popular teams: FC Barcelona 908, Manchester United 829, Chelsea 817, Arsenal 802, Liverpool 827, Tottenham 816, Newcastle United 4002, Manchester City 834, Real Madrid 911, Bayern Munich 316, RSC Anderlecht 53. If you want to embed some other team's matches, please contact us for team ID's.
To embed a single match, use the event-method of the sofanaticsEmbedAPI-object:
sofanaticsEmbedApi.event(eventId, width, height)
Replace the eventId with the ID of the event and the width and height with the size (in pixels) at which you want to embed the match. You can find the eventId by looking at the URL of the event on Sofanatics: http://sofanatics.com/event/<eventId>
The more space you give for your Stadium, the better the user experience will be. The absolute minimum size is 680 pixels in width and 500 pixels in height. The minimum size is enforced by the embed script.
When users use any of the Facebook and Twitter sharing features in your, the links point to the url (including any query parameters) where the stadium was embedded. Therefor you should embed the stadium only on publicly available pages that can be accessed by everyone. That way you will enjoy the viral effect of your Stadium too.
There is some limitations for embeds targeted to Finnish audience. If you wish to use our API in Finland, please contact our CEO Toni first.
See our demo.
Place the following code snippet at the location where you would like to embed the match page. The snippet will bring users to the next match of FC Barcelona (teamId=908) and embed the stadium with a width of 780 pixels and a height of 600 pixels:
<script src="http://cf1.sofanatics.com/embed/js/api/v1.js" type="text/javascript"></script>
<script type="text/javascript">
sofanaticsEmbedApi.nextMatchForTeam(908, 780, 600);
</script>
The following snippet will embed the stadium page for the 2011 Champions League final (eventId = 111317) with a width of 780 pixels and a height of 600 pixels.
<script src="http://cf1.sofanatics.com/embed/js/api/v1.js" type="text/javascript"></script>
<script type="text/javascript">
sofanaticsEmbedApi.event(111317, 780, 600);
</script>
Toni Laturi
CEO, Co-Founder
toni@sofanatics.com
@tlaturi
Kai Hannonen
CTO
kai@sofanatics.com
@kaihannonen