api - Facebook Referral URL decode -


sometimes burst of visitors facebook, curious know on facebook if page public, of course!

is there way decode , track facebook referral url actual page in facebook?

url format following:
http://www.facebook.com/l.php?u=http%3a%2f%2fwww.domain.com%2f&h=iaqdjuc4aqhjqeixcoi8z9jamgydk8vpuylpdart3ahu6q&s=1

from mobile shorter:
http://m.facebook.com/l.php?u=http%3a%2f%2fwww.domain.com%2f&h=baqfx067m&s=1

where domain.com website example.

you can extract url manually using substr , apply decodeuricomponent:

function extractfacebookurl(u) {      u = u.substr(u.indexof('l.php?u=') + 8); // remove before ?u=      u = u.substr(0, u.indexof('&')); // remove after &        return decodeuricomponent(u);  }    var link = "http://www.facebook.com/l.php?u=http%3a%2f%2fwww.domain.com%2f&h=iaqdjuc4aqhjqeixcoi8z9jamgydk8vpuylpdart3ahu6q&s=1";  var linkmobile = "http://m.facebook.com/l.php?u=http%3a%2f%2fwww.domain.com%2f&h=baqfx067m&s=1";    document.body.innerhtml = extractfacebookurl(link) + "<br/>" + extractfacebookurl(linkmobile);


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -