Hi all,
i have a facebook iframe tab when someone press like its opens him a box with a button named “view” ,
when the person clicks on the button he is redirecting to the photos page in the facebook fan page to see the the photos.
i want instead of the box the opens to redirect the person directly after he pressed liked to the photos page without any box or any button.
and another thing i noticed that when right now when you press the view button, the photos page is opening in the same iframe and its look funny like faceook inside facebook.
so i need like a redirect command , instead of opening a box with button view , i want the browser to reload a different page (the photo page) and go out from the iframe , like refresh the browser to a different page so it will go out form the iframe.
i attached here the code of my page:
<?php
header(‘Content-type: text/html; charset=utf-8′);
// prevent from caching
header(‘Expires: Mon, 26 Jul 1997 05:00:00 GMT’);
header(‘Last-Modified: ‘.gmdate(‘D, d M Y H:i:s’).’ GMT’);
header(‘Cache-Control: no-store, no-cache, must-revalidate’);
header(‘Cache-Control: post-check=0, pre-check=0′, false);
header(‘Pragma: no-cache’);
define(‘BASE_DIR’, ‘./’);
/**
* Check liked
* return bool
*/
function isLiked() {
$data = getData();
return $data[page][liked];
}
/**
* Get signed request data
* return array
*/
function getData () {
$signed_request = $_REQUEST[signed_request];
list($encoded_sig, $payload) = explode(‘.’, $signed_request, 2);
return json_decode(base64_decode(strtr($payload, ‘-_’, ‘+/’)), true);
}
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<link rel=”stylesheet” type=”text/css” href=”style/style.css” />
<title>Lorem Ipsum</title>
<script src=”http://connect.facebook.net/en_US/all.js”></script>
<script>
FB.Canvas.setAutoResize();
</script>
<script language=”javascript” type=”text/javascript” src=”js/jquery-1.3.2.min.js”></script>
<script type=”text/javascript”>
$(document).ready(function(){
$(“#btn”).click(function(){
$(“.downloadBox”).hide();
});
$(“#videoImg”).click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<!–start wraper–>
<div class=”wraper”>
<!–======start Main area–>
<div class=”main”>
<!–======start Header–>
<div class=”header”>
<img src=”images/arrow_header.jpg” alt=”arrow” />
<span>Click <b>”Like”</b>Above</span>
<p>xxx xxxx</p>
<i>Jxxxxxxxxxxxxxxxxxxxxxxxxxxx</i>
</div>
<!–===========start box–>
<div class=”box”>
<div class=”video”>
<object width=”480″ height=”300″><param name=”movie” value=”http://www.youtube.com/v/xxxxxx?fs=1&hl=en_US&rel=0&autoplay=1″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/xxxxxxk?fs=1&hl=en_US&rel=0&autoplay=1″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”480″ height=”300″></embed></object>
</div>
<?php
if ( isLiked() ) {
?>
<div class=”downloadBox” id=”shBtn”>
<b>Thanks for liking this page</b>
<a class=”btnDownload” href=”xxxxxxx”><img src=”images/download_now_1.png” alt=”download btn”></a>
<a href=”#” id=”btn”>Show