Create Referral Pages to Easily Share Your Services
Implement referral pages so your advocates can easily share and promote your services. With Genius Referrals, your advocates can use referral links via emails, personalized URLs, and printable QR codes to maximize the reach of your campaigns.
<?php
require_once "../vendor/autoload.php";
$contentType = "application/json"; // The content type
$xAuthToken = "2zfs266b71b8"; // Your API Token, you can get your token here https://app.geniusreferrals.com/en/settings/api-access
$accountSlug = 'sandbox';
$advocateToken = 'f67f534ee98f5128b3086c7a5fee5e1c016c119b';
$client = new GeniusReferralsLib\GeniusReferralsClient($contentType, $xAuthToken);
// Getting the share links package for the advocate
$advocateShareLinksResponse = $client->getAdvocates()->getShareLinks($accountSlug, $advocateToken);
if($advocateShareLinksResponse->code == 200)
{
$objAdvocateShareLinks = $advocateShareLinksResponse->data;
// Process the response and get the URLs for each distribution channel.
} else {
// Handle errors
}
{
"code":200,
"data":{
"get-10-of-for-90-days":{
"my-first-package":{
"direct-email":"https://gr3f.co/c/e2323/62",
"facebook-share":"https://gr3f.co/s/e2323/57",
"google-1":"https://gr3f.co/s/e2323/59",
"linkedin-post":"https://gr3f.co/s/e2323/60",
"personal":"https://gr3f.co/c/e2323/63",
"pin-it":"https://gr3f.co/s/e2323/61",
"twitter-post":"https://gr3f.co/s/e2323/58"
}
}
}
}