Online Book Reader

Home Category

Facebook Cookbook - Jay Goldman [63]

By Root 615 0
the primary network for the uid.

“Jay Goldman (Toronto)”

“You”

subjectid

uid

None

The Facebook ID of the subject of the sentence where this name is the object of the verb of the sentence. Will use the reflexive when appropriate. When subjectid is used, uid is considered to be the object and uid’s name is produced.

See upcoming explanation in the text

useyou

bool

true

Use “you” if uid matches the logged-in user.

“Jay Goldman”

“You” if true; “Jay Goldman” if false

The only one that really needs explanation is subjectid, which feels a little like you’re being asked a question on Jeopardy! in the “Mind-Bending Grammar Rules” category for $500. It’s easiest to understand in the context of an example from the Mini-Feed story that the Photos application pushes out:

tagged

a photo of .

In this example, 561415460 is my prison number and 567770429 is my wife, Bianca. I’ve just tagged her in a photo of our daring escape under the wall, and Facebook has helpfully pushed that story out to all of my friends, including Warden Norton. That sentence would get rendered for me as:

You tagged a photo of Bianca Gutnik Goldman.

When my wife sees the item in her News Feed, right before she yells at me for putting the cops on our tail, she’ll see:

Jay Goldman tagged a photo of you.

When Warden Norton sees the item pop up in his News Feed, right before he jams the big red button on his desk and sends the boys in blue after us, he’ll see:

Jay Goldman tagged a photo of Bianca Gutnik Goldman.

But wait! There’s more. If I tagged a photo of myself, the FBML would look like this:

tagged a photo

of .

Now when I see the item, dejected and alone in a dingy roadside motel after Bianca left me for being stupid moments before being apprehended, the sentence would be rendered as:

You tagged a photo of yourself.

When Bianca sees it, celebrating in the Cayman Islands at her new beach-side bar, she’ll see:

Jay Goldman tagged a photo of himself.

The moral of this story is that the Cayman Islands are a British overseas territory, which means they have an extradition policy and my wife is coming right back to join me in the slammer. Think carefully before you tag yourself in incriminating photos, folks (but not before you use fb:name, which can save you a whole world of trouble)!

He Said, She Said: Dealing with Pronouns


Problem


Gender issues are complicated. I could just use the third-person pronouns (“they” and “their”) for everything, but that’s really not grammatically correct. How do I figure out whether to use “he” or “she”? And what about people who didn’t specify a gender on their Profiles?

Solution


The fb:pronoun tag will output the correct pronoun for the user specified by the uid parameter. The simplest form is:

Discussion


Just like the fb:name tag, the fb:pronoun tag gets itself into all kinds of trouble with possessives and reflexives and lots of other grammar ghouls that you don’t want to have to deal with. Luckily, FBML will deal with them for you! See Table 6-2 for a list of the tag’s parameters.

Table 6-2. Parameters for fb:pronoun

Name

Type

Default value

Description

They see

I see

uid

int

N/A

The Facebook user ID ( uid) of the user or Page whose pronoun you want to show. You can also use loggedinuser or profileowner. This is the only required field.

“he”

“you”

capitalize

bool

false

Capitalize the pronoun.

“He”

“You”

objective

bool

false

Use the objective form (him/her/you/them).

“him”

“you”

possessive

bool

false

Use the possessive form (his/her/your/their).

“his”

“you”

reflexive

bool

false

Use the reflexive form (himself/herself/ yourself).

“himself”

“yourself”

usethey

bool

true

Use “they” if gender is not specified.

“him” (but if I removed my gender, “they”)

“you”

useyou

bool

true

Use “you” if uid matches the

Return Main Page Previous Page Next Page

®Online Book Reader