javascript - Redirect to a page if shared from Facebook -


i don't know whether possible. creating site in php. possible detect previous url facebook/twitter, , if yes redirect page?

in detail have page , b. there share button in page b. on clicking button post title, image, description etc of page b facebook. clicking in facebook redirect page a.

can me?

if pages on same domain can use sessions.

for external pages can use $_server['http_referrer'].

i.e.

if ( $parts = parse_url( $_server['http_referrer'] ) ) {    if($parts['host'] == "www.facebook.com"){       //do     } } 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -