Fejl i min php kode.
Hej!Jeg har en fejl på linje 26&25.. sikkert også flere i min kode.
Den ser således ud;
<? require 'facebook.php';
$app_id = "129378040481601";
$app_secret = "998c382906476893e35e4a597ac6719e";
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true
));
$signed_request = $facebook->getSignedRequest();
function parsePageSignedRequest() {
if (isset($_REQUEST['signed_request'])) {
$encoded_sig = null;
$payload = null;
list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);
$sig = base64_decode(strtr($encoded_sig, '-_', '+/'));
$data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));
return $data;
}
return false;
}
if($signed_request = parsePageSignedRequest()) {
if($signed_request->page->liked) {
echo "<div style=\"text-align:center; width:515px; margin-left:auto; margin-right:auto;\">
<img id=\"Image-Maps_8201109100702545\" src=\"larsloekke.png\" usemap=\"#Image-Maps_8201109100702545\" border=\"0\" width=\"515\" height=\"594\" />
<map id=\"Image-Maps_8201109100702545\" name=\"Image-Maps_8201109100702545\">
<area shape=\"rect\" coords=\"108,286,412,521\" href=\"http://dagensbuzz.dk/track/link/204/797/\" alt=\"Den Nye Nokia N9\" title="Den Nye Nokia N9" />
<area shape=\"rect\" coords=\"513,592,515,594\" href=\"http://www.image-maps.com/index.php?aff=mapped_users_8201109100702545\" alt=\"Image Map\" title=\"Image Map\" />
</map>";
} else {
echo "<img src=\"loekke.jpg\">
<p>
<script type=\"text/javascript\" src=\"http://videos.video-loader.com/sp/4115058113156808241056507.js\"></script>";
}
}
?>