Sorry about that, but Facebook caches all images, so it wouldn't countdown
I have tried several things like a JS which sets the right image URL, but it didn't work.
If there is anyone who has more expirience with the Facebook API (this was my fist contact with it), I would be glad to serve the whole thing.
Here is the my code which doesen't work:
PHP Code:
<?php
// Copyright 2007 Facebook Corp. All Rights Reserved.
//
// Application: Ubuntu Banner
// File: 'index.php'
// This is a sample skeleton for your application.
//
require_once 'facebook.php';
$appapikey = '44df87f7559f57d342b8e50eddcb2655';
$appsecret = '53078f2bc7b2c786170668bd90d25111';
$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();
$id=0;
if(isset($_GET['id'])){
if ($_GET['id']>0&&$_GET['id']<=3){
$id = $_GET['id'];
}
$facebook->api_client->profile_setFBML(NULL, $user_id, 'profile', NULL, NULL, '<a href="http://www.ubuntu.com"><img id="ubuntuImg" src="http://neogates.ath.cx/~huwa/ubuntuLucid/lucid.php?id='.$id.'" alt="Ubuntu 10.4 Countdown"></a><script>document.images.ubuntuImg.src=http://neogates.ath.cx/~huwa/ubuntuLucid/lucid.php?id='.$id.'</script>');
}
?>
<center>
<font color=red>Don't forget: <fb:add-section-button section="profile" /> (If you can't see a button, you allready added the banner to your profile)</font>
<p><center>Offical JavaScript Banners: <a href="http://www.ubuntu.com/getubuntu/countdown" >http://www.ubuntu.com/getubuntu/countdown</a><br>
Dynamic Serverside Banners: <a href="http://neogates.ath.cx/~huwa/ubuntuLucid" >http://neogates.ath.cx/~huwa/ubuntuLucid</a><br>
</center></p>
<h2>Select Banner: </h2>
<table>
<tr>
<td>Option 1 - Change<br>by John Baer</td>
<td><a href="http://www.ubuntu.com"><img src="http://neogates.ath.cx/~huwa/ubuntuLucid/lucid.php?id=1" id="countdownimage" alt="Ubuntu 10.4 Countdown"></a></td>
<td><?php if ($id==1) { ?> Selected <?php } else { ?> <a href="?id=1">Select</a> <?php } ?></td>
<tr>
<td>Option 1 - Orange<br>by Immanuel Peratoner</td>
<td><a href="http://www.ubuntu.com"><img src="http://neogates.ath.cx/~huwa/ubuntuLucid/lucid.php?id=2" id="countdownimage" alt="Ubuntu 10.4 Countdown"></a></td>
<td><?php if ($id==2) { ?> Selected <?php } else { ?> <a href="?id=2">Select</a> <?php } ?></td>
<tr>
<td>Option 3 - lynx<br>by Amanda Warzecha</td>
<td><a href="http://www.ubuntu.com"><img src="http://neogates.ath.cx/~huwa/ubuntuLucid/lucid.php?id=3" id="countdownimage" alt="Ubuntu 10.4 Countdown"></a></td>
<td><?php if ($id==3) { ?> Selected <?php } else { ?> <a href="?id=3">Select</a> <?php } ?></td>
</table>
<font color=red>Don't forget: <fb:add-section-button section="profile" /> (If you can't see a button, you allready added the banner to your profile)</font>
<center>
More Info: <a href="https://wiki.ubuntu.com/Website/LucidCountdownBanners" >https://wiki.ubuntu.com/Website/LucidCountdownBanners</a>
Bookmarks