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" "[login to view URL]">
<html xmlns="[login to view URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/[login to view URL]" />
<title>Lorem Ipsum</title>
<script src="[login to view URL]"></script>
<script>
[login to view URL]();
</script>
<script language="javascript" type="text/javascript" src="js/[login to view URL]"></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/[login to view URL]" 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="[login to view URL]"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="[login to view URL]" 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/[login to view URL]" alt="download btn"></a>
<a href="#" id="btn">Show / Hide</a>
</div>
<?php
}
?>
</div>
<!--===============start content Text-->
<div class="conText">
<b><u>x x x x </u></b>
<p>xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx</p>
</div>
<!--===============end content Text-->
</div>
<!--======end main area-->
<!--========start footer==============-->
<div class="footer">
<b>Join Us</b>
<ul class="footerNav">
<li><a href="[login to view URL]://[login to view URL]" title="Share with us on facebook" target="_blank"><img src="images/[login to view URL]"/></a></li>
<li><a href="mailto:xxxxx"><img src="images/[login to view URL]" alt="mail btn" /></a></li>
<li><a href="[login to view URL]" target="_blank"><img src="images/[login to view URL]" alt="twitter btn" /></a></li>
</ul>
</div>
<!--========end footer==============-->
</div>
<!--end wraper-->
<div id="fb-root"></div>
</body>
</html>
now, in the 71 line it start the commands of what to do after its liked:
<?php
if ( isLiked() ) {
?>
<div class="downloadBox" id="shBtn">
<b>Thanks for liking this page</b>
<a class="btnDownload" href="xxxxxxx"><img src="images/[login to view URL]" alt="download btn"></a>
<a href="#" id="btn">Show / Hide</a>
</div>
<?php
}
?>
</div>
i want to change it to redirect , lets say to [login to view URL] and not open in the iframe tab of facebook.
Matan