First I added a Facebook Like button to my website. Then I clicked the button and it added the entry onto my Wall as it should. When I hover my mouse over the link it shows:
http://www.oil-testimonials.com/likeButton.php?fb_ref=110&fb_source=profile_multiline
However, when I click on it and then view the session variables on my website it shows the following for the referrer:
http://www.facebook.com/l.php?u=http%3A%2F%2Fwww.oil-testimonials.com%2FlikeButton.php%3Ffb_ref%3D110%26fb_source%3Dprofile_multiline&h=zAQDJkkeA
In my header.php file I have been unable to grab the ref variable that Facebook sends using the following code:
if (isset($ref)) {
$_SESSION['facebook'] = $ref;
}
Do I need to convert the referral address into one that does not use the % codes first? Is that why it’s not working for me?
Thanks!