05-06-2012, 10:30 AM
Hi, I hope this is in the right section. This is a PHP script that interacts with a simple Facebook app you can set up. It is like a 'content locker' because you can protect your downloads/links from being accessed unless somebody shares a link of your choice on facebook.
You fill out the script as shown below, set up your simple app and then link your visitors to the PHP file instead of your download/page/whatever. Then they will be automatically sent to Facebook and its share box. Once they click share they will be redirected to your download or wherever you want to send them.
It's pretty simple but ask if you want any help with it.
You fill out the script as shown below, set up your simple app and then link your visitors to the PHP file instead of your download/page/whatever. Then they will be automatically sent to Facebook and its share box. Once they click share they will be redirected to your download or wherever you want to send them.
It's pretty simple but ask if you want any help with it.
PHP Code:
<?php
$app_id = "YOUR APP ID";
$your_website_link="http://YOUWEBSITE.com";
$picture="http://THE-PICTURE-YOU-WANT-DISPLAYED-IN-THE-SHARE-BOX.gif";
$title="THE TITLE YOU WANT IN FACEBOOK'S SHARE BOX";
$description="THE DESCRIPTION YOU WANT IN FACEBOOK'S SHARE BOX";
$redirect_user="http://THE-LINK-YOU-WANT-TO-SEND-THEM-TO-AFTER-SHARING.com";
$message="Whatever";
//$feed_url = "http://www.facebook.com/dialog/feed?app_id=". $app_id ."&redirect_uri=" . urlencode($redirect_user)."&message=".$message;
$feed_url = "http://www.facebook.com/dialog/feed?app_id=". $app_id . "&link=".urlencode($your_website_link)."&name=".$title."&picture=".urlencode($picture)."&description=".$description."&redirect_uri=" . urlencode($redirect_user)."&message=".$message;
if (empty($_REQUEST["post_id"])) {
echo("<script> top.location.href='" . $feed_url . "'</script>");
} else {
echo ("Feed Post Id: " . $_REQUEST["post_id"]);
}
?>