Developers

HypeSpark Sharing Basics

The simpilest way to interface with HypeSpark is to link to us from your website. Linking is easy. Simply use the following code:

http://www.hypespark.com/admin/share.php?l=http://www.mattleaconsulting.com
Parameter Description  
1 The url you wish to share on HypeSpark Required
ot The ID of a specific Offer that you would like the user to share Optional

Javascript API

HypeSpark provides a simple javascript API for interfacing with HypeSpark.com. The first thing you need to do is include the HypeSpark Javascript API by placing this code into the header of your site:

Code:
<script language="javascript" src="http://www.hypespark.com/assets/external/php/share.js.php"></script>

Once you have done this you may use the following functions to interface with HypeSpark

DrawLink

This function draws a link to that allows the user to share a link on HypeSpark.

Code:
<script language="javascript"> HSShare.DrawLink({}); </script>

There are several options that can passed in that will modify the links behavior

Option Description Default
ShareUrl The url you wish to share on HypeSpark The url of the page the script is called from
Body The body of the ancor tag The HypeSpark logo
OfferTierId The ID of a specific Offer that you would like the user to share null - This will use the users currently sellected Offer

Below is an example using the options

Code:
<script language="javascript"> HSShare.DrawLink({OfferTierId:1,Body:"I also link to HypeSpark",ShareUrl:"http://www.mattleaconsulting.com"}); </script>