[Facebook] Obtaining your User ID

Your own Facebook User ID is required in many places, like setting admin ID on your page’s OpenGraph tags. Most of advice available on the web regarding getting your own Facebook ID suggest looking at links on your profile page, but that kind of advice is usually outdated and unusable if you have vanity URL (your username replaced user ID in URLs). You can look into the profile page source and bash through tons of code, and yes, you can find it looking for some strings inside the source code, like it’s pictured on a screenshot. But it’s a tedious job, and there are more elegant ways.

Specifically, you can use OpenGraph API Explorer, available here. Input field is already prepopulated with me value, that obviously tells the Explorer to show data for currently logged in user. But before this could work, you have to authorize API Explorer to access your data by clicking Get access token button, choosing minimal permissions (user_about_me is definitely enough – see this screenshot), and authorizing the application in a standard way, like any other with Facebook.

After granting permissions, Access Token field is populated automatically, and you can clickSubmit button to get information about your user. User ID will be the first field.

When you have your user ID, you can check if it’s a proper one on the same page – just enter your ID instead of me and hit Submit – you should see your basic data.

Where are you going, MySQL?

Recently Brian Aker announced that he will develop RDBMS trimmed especially to use with web-apps. It will be named Drizzle.

Features of Drizzle

What will be changed in Drizzle in comparison to MySQL? First of all, whole architecture will be changed. Drizzle will be not monolithic chunk of software like its predecessor, but it will be based on microkernel idea. Most features will be moved from core to optional modules. Those features, like triggers, views, or even query cache, are standard for modern database servers, but are very rarely used in webapps (which is very strange for me, but I’ll come back to this later). One of these modules will be InnoDB engine (owned by Oracle, double licensed), which would make upgrading to newest version of that engine easier. UTF-8 will be standard. Generally – looks nice.

On the other hand, Windows users will be sad, because probably (but not for sure), Drizzle will be available only for Linux and MacOS X. Maybe it’s not such a big deal, because most of production servers are working under non-windows OS’, but for development it would be nice to have a possibility to test-install this RDBMS on Windows.
Continue reading Where are you going, MySQL?

Defending PHP (or not)

Today I’ve read article “Defending PHP” by Jim R. Wilson. He begins saying Ugh. I am so tired of defending PHP. And I’m saying “I am so tired of people defending PHP”. Why? First of all, if everything is OK, the language defends itself, and if lot of people complain about it, maybe really something is wrong with PHP?
Continue reading Defending PHP (or not)

Rounded corners

Recently bashing through source code of some CMS, I’ve found interesting JavaScript library. It appeared that it is also delivered separately. Its purpose is to create nice-looking rounded corners – here you can see design created only using this software. Nifty Corners Cube, because that’s how it’s called, is combination of JavaScript and CSS.