Due to excessive spam abuse, unfake.it will soon begin to block URLs from various other URL shortening services such as http://bit.ly/. All incoming URLs (no matter if they’re injected via web or API) from blacklisted domains won’t be shortened any longer as of the effective date.

Effective date is: 2010-08-26 6pm UTC

Reasons ain’t to harm other shortening services, but to reduce spam. It’s a common practice of spammers to shorten and shorten and shorten their URLs through more and more shortening services. unfake.it won’t support such habits any longer.

If you intend to shorten formerly shortened URLs again and have the feeling that it’s okay, get in touch with me. We’ll find a way! Maybe by using an API key.

I feel sorry for all those 42.000+ short URLs, but there ain’t no other way to prevent further spamming. Already shortened URLs will remain valid, so they might still be accessed in the future.

Ich wundere mich seit Tagen über extrem angestiegenen Traffic für meinen URL Shortener unfake.it. Des Rätsels Lösung ist wohl sehr einfach: eine Google-Suche nach “url faker” liefert 19.400.000 Ergebnisse. Und unfake.it ist auf Platz 1 inkl. Mini-Sitelinks, Platz 2 ist mein Blog-Artikel über unfake.it vom 25. Januar 2009. Das ist ziemlich neu, da bin ich mir relativ sicher.

Da wundert mich nichts mehr. Leider, leider gerät das System aber so langsam aber Sicher an die Lastgrenzen und ich muss mir überlegen, ob ich nicht doch eine meiner Regeln breche, denn ich hatte ursprünglich beschlossen und kommuniziert, dass unfake.it niemals Werbung vor oder nach dem Klicken einer Kurz-URL anzeigen wird.

Was meint ihr? Sollte ich Werbung schalten und so ggf. neue, schnellere Hardware finanzieren? Oder findet sich ggf. irgendwo ein freundlicher Sponsor? Bin gerne bereit, darüber zu verhandeln 🙂

Hi there,

during the past few days, unfake.it‘s performance increased dramatically. Several scripts and jobs have been moved onto new servers, the database structure and various SQL statements have been enhanced and even SQL SELECT statements have been optimized to more and more use readonly slave servers. Most URLs are being faked in much less than a tenth of a second. The magical previews of faked URLs are generated almost instantly, since performance increased dramatically.

Unfortunately, faked URLs weren’t posted to Twitter when using the WordPress Plugin during the past 4 hours due to a tiny misconfiguration. This issue could be solved.

unfake.it has become a more and more commonly used URL shortener during the past months. Almost 1.000 URLs are faked in a 24 hour period, even though this magic edge has not yet been crossed. See the stats for more information ’bout that.

Bye, Thomas

Hi there!

A few days ago, I started to write my first own facebook application. It all went quite okay until one certain point: I wanted my application to update the profile box of the user, which uses the app at that single moment. And that wasn’t as easy, as I thought.

The problem was: after the profile box has been updated, all profile boxes of all users had the same content – the content of the user who last updated his profile box.

I will come to the solution later. First of all, a quick explanation of what I needed to do:

  1. I read the documentation of facebook’s application guide to understand the API and the FBML language
  2. I set up my own application using the step-by-step guide
  3. I set up my new application on my own host including facebook’s PHP libraries

Here’s the code step-by-step (just put all sniplets together):

Code sniplet #1

require_once 'facebook-platform/php/facebook.php';

$appid = 'xxxxxxxxxxxx';
$appapikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$appsecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();

Above: first of all, we need to include facebook’s PHP libraries, define several variables for our application, initialize our facebook object and retrieve the UID of the user who currently uses the application.

Code sniplet #2

$fb_box = "<H4 class='box_header clearfix'><span>";
$fb_box .= "Hello World!";
$fb_box .= "</span></H4>";
$fb_box .= "<div>I am ";
$fb_box .= "<fb:name uid=\"$user_id\" useyou=\"false\" />.";
$fb_box .= "Nice you're on my page.</div>";
$fb_box .= "Some more content in HTML or FBML...";

Above: we then define the content which we want to be displayed within the profile box. In this examble, it will be the name of the user, greeting the visitor.

Code sniplet #3

$fb_box_handle = 'pb_' . $appid . '_' . $user_id;

Above: this is important! At this point, I got stuck for a while. The reason was, facebook caches profile boxes content until the application’s canvas page is requested for the next time. The handle is very important for that caching mechanism, since it has to be a unique identifier for each application and each user. For that reason, I simply use the prefix ‘pb_‘ followed by the applications ID (defined above) and the UID of the current user (also defined above)!

Code sniplet #4

'api_key' => $appapikey,
'v' => '1.0',
'uid' => $user_id,
'profile' => '<fb:narrow><fb:ref handle="' . $fb_box_handle . '" /></fb:narrow>',
'profile_main' => '<fb:ref handle="' . $fb_box_handle . '" />',

Above: the rest is quite simple. We make an API call to facebook and send our application key, the protocol version, the UID of the facebook user whose profile box ought to be updated and, of course, the content for that box. The content will be sent as the reference handle we defined earlier.

If you want to update multiple profile boxes with one single API call, I guess, this could work if you send an array containing the UIDs. If not, you can still get all those UIDs, walk through the array and perform multiple API calls. I read somewhere, some users had problem updating large numbers of profiles… Just give it a try.

Comments (if it worked for you or even if it didn’t) are appreciated 🙂

UPDATE because of comment #2:

The example above is about updating content in a users profile, not about setting up a profile box on a profile. You should read the manual carefully.

A user has to approve a certain application to create a profile box. Therefore, you need to render a button, which sets up the box. You can easily do this by:

$appapikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$appsecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();
$facebook->api_client->profile_setFBML($appapikey, $user_id, 'profile', NULL, 'mobile_profile', 'profile_main');
echo "<fb:add-section-button section='profile' />";

The last line renders the button, you want to have on your canvas page.

Good luck! Thomas