-
I was driving home with my middle daughter and a load of groceries; the windows were down, because I don't have air conditioning. Luckily it was a very pleasant day.
As I pulled away from a light, someone bellowed across four lanes and a median, "HIPPY!"
In a split second I considered my options. I discarded the immediate outrage -- C'mon, people, there's a child in a car, must we resort to name calling? -- because I didn't want to turn it into a big problem. Then I realized: I'm a pony-tailed peace-loving man driving an electric car; "hippy" is pretty accurate.
I put my hand out the window and raised a peace sign high.
It wasn't until I was past the intersection that I realized my car has no electric symbols on it anywhere. Either I had just passed a friend with a sense of humor, or someone really wants me to cut my hair.
-
As I said before, I've had some trouble with PHP Facebook development.. This time, I couldn't get a user ID because the user came from a non-Facebook page.
An application's drawing page is called it's "canvas page". It's the starting point for the whole app. Unfortunately, when the user jumps there from a bookmark, or enters the URL into the browser directly, Facebook can't supply the user ID. The app can't do anything, because it doesn't know who the heck it's working for. The user must visit your app's canvas page from a Facebook page.
Since your canvas page is a Facebook page, and the user just visited it directly, you'd think that redirecting to the same page would do the job. And it does! But only if the user clicks on a link.
Then there's the additional problem of users who don't allow you to see their user ID. You have to ask them for permission first.
I put together a skeleton that takes care of all these issues for FBML pages (I don't think it'll work for iFrame pages). Read on for the code.
-
I'm doing some Facebook development, using the PHP client library. I've been absolutely boggled by the lack of documentation. I mean, maybe I'm just missing it, but... nothing for the PHP client library at all. And the way they treat some development issues as trivial reminds me of professors leaving the really difficult problems as "an exercise for the student".
So I'm going to document my problems and solutions here on my website. I assume you're already familiar with web development in general, so you should have a good grasp of HTML and whatever client you're using. I'm a PHP programmer, so that's what I'll deal with first.
Continue reading "Facebook Development: The PHP Client Library"
-
I'm playing Farkle a lot on Facebook. It's a mindless but somehow interesting game. The idea is that you throw 6 dice. If any of those dice make one of the scoring combinations, you can pick them up and roll the remaining dice again, hoping to score some more. If you run out of dice, you get to continue with 6 more. If you reach at least 300 points, you can "bank" the points you've made this turn and start with 6 fresh dice.
The trick is that if, at any time, you roll no scoring combination, you "Farkle". You lose all the points you made this turn. Farkle three times in a row, and you lose 500 points, to boot.
Being the mathematically inclined person I am, I've been trying to find the most advantageous method of picking up the dice.
(2 comments)