By Developers, For Developers

Historical errata for Developing Facebook Platform Applications with Rails

PDF PgPaper PgTypeDescriptionFixed onComments
7TYPO

row 2 : Are you nervous about everything you need to lean? I think you mean learn and not lean

2008-03-18
47TYPO

Last word of the 3rd paragraph is “unwieldly” but I think you mean “unwieldy” (no L). As in “This would quickly become unweildy.”

2008-03-18
14TYPO

On this page you reference “Facebooker” several times. But there isn’t consistency in the capitalization. The same goes throughout the book. I’m thinking it should be capitalized since things like ActiveRecord are. But here it’s not:

“Finally, facebooker makes it painless to tur n your exist-
ing application into a Facebook application as we’ll see in Chapter 8,
Integrating Facebook and Existing Websites, on page 122. ”

2008-03-18
16ERROR

When I navigate to the link for the Karate Poke application listed in the footnote at the bottom of this page:
apps.facebook.com/karate_poke
I see a blank Facebook canvas-looking page. In order to get to the page shown in Figure 2.1, I had to click the small “Karate Poke” link in the sentence “Page built by Karate Poke” at the top of the page. Then, from there, there’s a button on the right side of the page that, when clicked, takes me to the page shown in Figure 2.1

2008-03-18
18TYPO

The first paragraph says that on my profile page under my picture I should see an “Engage in Battle” link. But I see a link called “View your battles.”. Perhaps the name of that link changed after this was written?

2008-03-18
49SUGGEST

To get a Facebooker::Session object I simply call ‘Facebooker::User.new(facebook_id)’ with the user’s facebook_id passed in as a paramter. My code is now less hairy since I don’t have to store the session_key in my User model. I also don’t have to deal with udpating the session_key when a user removes and then re-installs the app. Let me know what you all think.

2008-03-18
49SUGGEST

Sorry, I meant to say ‘Facebooker::User.new(facebook_id).session’ instead of ‘Facebooker::User.new(facebook_id)’

2008-03-18
33TYPO

Last paragraph, 4th line:

“looks lik Figure 3.1” should be “looks like Figure 3.1”

2008-03-14
39TYPO

“def new” code example, 6th line:

“Attach your friends” should be “Attack your friends”

2008-03-14
39SUGGEST

“def new” code example:

The first variable assigned, from_user_id, is never used later in the code. Wondering if user.to_s in line 7 should be from_user_id instead, or maybe from_user_id is unneeded?

2008-03-14
39TYPO

“def new” code example, last line:

“en” should be “end”

2008-03-14
40TYPO

“def new” code example, 2nd-to-last line:

Not sure why this line is here at all…

2008-03-14
42TYPO

2nd text paragraph, last full line:

“both those.” should be “both of those.”

2008-03-14
44TYPO

2nd-to-last paragraph, 1st line:

“Before we can do make user of our User model” should be fixed somehow

2008-03-14
48TYPO

3rd text paragraph, 1st line:

“parameter optional” should be “parameter is optional”

2008-03-14
48TYPO

Last text paragraph, 4th line:

“key’s don’t change often” should be “keys don’t change often” (remove apostrophe in “key’s”)

2008-03-14
49SUGGEST

Last paragraph before start of section 4.3, 2nd line:

In “we can access the Facebook session of our users” it seems like plurality of “session” and “users” should agree. Maybe “sessions of our users” instead?

2008-03-14
50TYPO

Last paragraph, 1st line:

“Now that we have user and moves” should be “Now that we have users and moves” (make ‘user’ plural)

2008-03-14
51SUGGEST

Last text parapraph, 1st sentence is confusing:

“With our model in place, we can set up the associations for our Attack model.” What model is in place?

2008-03-14
52TYPO

Console session doesn’t seem to agree with the text that immediately follows.

Code reads: “move = Move.create(:name=>”karate chop")

Text says: “I grabbed a Move object from the database”

It looks like the Move was created, not grabbed from the database.

2008-03-14
56TYPO

2nd-to-last text paragraph, 1st line:

“let’s put add our check” should be “let’s add our check”

2008-03-14
56TYPO

Last code sample on page:

last line (“end”) has indentation messed up

2008-03-14
56TYPO

Last line on page:

“We can do that from script console” should be “We can do that from script/console” (add slash)

2008-03-14
57TYPO

2nd paragraph of section 4.6, 2nd line:

“users profile” should be “user’s profile” (add apostrophe)

2008-03-14
57TYPO

Last paragraph on page, 2nd line:

“users friends” should be “user’s friends” (add apostrophe)

2008-03-14
61TYPO

2nd text paragraph, 3rd line:

“We can use the :include option on our relationships combine all of this into one query”

should be:

“We can use the :include option on our relationships to combine all of this into one query”

(add “to”)

2008-03-14
66ERROR

The form shown on page 68 (Figure 5.4) looks just like the forms shown on the two previous pages (Figures 5.2 and 5.3).

Maybe 5.2 and 5.3 are showing the facebook style (with the blue “Attack!” button) when their code suggests they should show the default style as in Figure 5.1?

2008-03-14
69TYPO

2nd paragraph of section 5.2, 1st line:

“Our battles page show a list of attacks” should be “Our battles page shows a list of attacks” (show->shows)

2008-03-14
71TYPO

Last paragraph before start of section 5.3, last line:

“an no navigation” should be “and no navigation”

2008-03-14
72TYPO

3rd code example, last line is indented funny

2008-03-14
73TYPO

2nd code example, 1st line is indented funny

2008-03-14
75TYPO

Last paragraph, line 2

“users facebook id” should be “user’s facebook id” (add apostrophe)

2008-03-14
77TYPO

2nd (single line) paragraph:

“Here’s what FBML version looks like” should be “Here’s what the FBML version looks like” (add ‘the’)

2008-03-14
77SUGGEST

2nd (single line) paragraph:

Change period at end of sentence to colon?

2008-03-14
77TYPO

5th text paragraph, 2nd sentence:

Sentence reads:
“When I view the battles page of certain people, the page looks funny.”

The singular “page” doesn’t seem to agree with the plural “people”.

Maybe change to something like,
“When I view the battles pages of certain people, the pages look funny”?

2008-03-14
80TYPO

2nd paragraph of section 5.6, 1st line:

“a time whe Facebook” should be “a time when Facebook”

2008-04-07
80SUGGEST

2nd paragraph of section 5.6, 2nd line:

Should “that isn’t the case any more” be “that isn’t the case anymore”?

2008-03-14
82TYPO

Last paragraph, 2nd line:

“Notifications appear that the top” should be “Notifications appear at the top” (that->at)

2008-03-14
82TYPO

Last paragraph, 2nd line:

“top of a users home page” should be “top of a user’s home page” (add apostrophe)

2008-03-14
84TYPO

Code example, 7th line:

Change “Attack them back” to “Attack them back!” to match Figures 6.2 and 6.3

2008-03-14
85TYPO

Code example, 9th line:

Change “Attack them back” to “Attack them back!” to match Figures 6.2 and 6.3

2008-03-14
86TYPO

4th paragraph, 1st line:

Change “script console” to “script/console” (slash needed)

2008-03-14
86ERROR

4th paragraph, 2nd line:

What method is “notify_defender_via_email”? None of the methods we’ve defined quite match this name. Or is there some framework magic going on here?

2008-03-14
85ERROR

Last code example on page:

What is “deliver_attack notification”? We just defined “attack_notification”. Or is there some framework magic going on that makes this correct?

2008-03-14
88ERROR

2nd paragraph, 2nd line:

Looks like “notify_defender()” should instead be “send_attack_notification()”?

2008-03-14
88TYPO

Code example, first line is indented funny

2008-03-14
89ERROR

Code example, 6th line:

Change “Attack them back” to “Join the fight!” to match Figure 6.6

2008-03-14
89TYPO

2nd text paragraph, 3rd line:

“senders name” should be “sender’s name” (add apostrophe)

2008-03-14
90ERROR

Code example, 6th line:

Change “Attack them back” to “Join the fight!” to match Figure 6.6

2008-03-14
90TYPO

In code example at top of page:

Indentation gets messed up starting at end of TITLE heredoc

2008-03-14
90TYPO

2nd text paragraph, 2nd line:

“page that require a user” should be “page that requires a user”

2008-03-14
90ERROR

Last text paragraph, 1st line

Line runs off end of page and gets chopped off.

2008-03-14
91TYPO

2nd text paragraph, 4th line:

“by only show the attack form” should be “by only showing the attack form” (show->showing)

2008-03-14
91TYPO

3rd text paragraph:

“we can use check to see if” should be “we can check to see if”

2008-03-14
91SUGGEST

2nd code example, 5th line:

Add question mark to question, “Do you want to attack _”

2008-03-14
91SUGGEST

End of last paragraph:

Seems odd that the newsfeed would say “Alan and Beth attacked a friend” rather than “Alan and Beth attacked each other”. If this is really the behavior, maybe explain why?

2008-03-14
92TYPO

2nd code example:

What happened to {actor}? This was in the previous code block, but is now absent. Maybe some explanation if this is correct?

2008-03-14
93TYPO

Large code sample in middle of page:

Indentation gets screwy starting at end of TITLE heredoc

2008-03-14
94SUGGEST

Last paragraph, 1st line:

Currently reads:
“To register your feed templates, you just go to the…”

Suggestion:
“To register your feed templates, go to the…” (remove “you just” or maybe just “you”)

2008-03-14
94ERROR

Figure 6.8 does not appear to be referenced anywhere in the text.

2008-03-14
96SUGGEST

2nd code sample:

Indentation of “rescue” doesn’t seem right to me

2008-03-14
96TYPO

2nd text paragraph:

“we an add a call” should be “we can add a call”

2008-03-14
96SUGGEST

Last paragraph on page, 4th line:

Currently reads:
“We’ll look at a few different implementations of this comment.”

Not sure what exactly author meant to say. Maybe something like, “We’ll look at a few different implementations of this concept”?

2008-03-14
96TYPO

Last paragraph, 4th line:

“focus our attention to” seems like it should be “focus our attention on”

2008-03-14
96SUGGEST

Last paragraph, 5th line:

“users’ battles page” seems like it should be “users’ battles pages”

2008-03-14
97TYPO

Last text paragraph, 4th line:

“comment with the whatever wall” should be “comment with whatever wall”

2008-03-14
97TYPO

4th paragraph, last sentence:

Currently reads:
“Since we’re going to be looking up our comments based upon the user_id and ordering them based upon when they are created so let’s create and index on those fields.”

Suggestion: Remove either “Since at the beginning or ”so" near the end.

2008-03-14
98TYPO

3rd text paragraph, 3rd line:

“want to list add the comments” should be “want to add the comments” (remove “list”)

2008-03-14
99ERROR

Code example:

Maybe I’m not understanding something, but why does running the “comments = user.comments” line depend on whether the user has any recorded battles?

2008-03-14
99SUGGEST

2nd paragraph, last full line:

Currently reads:
“Fixing this hole is simple, we can use the rails h() helper to strip the tags from our comments.”

Should the comma after “simple” be a semicolon instead?

2008-03-14
99TYPO

2nd-to-last paragraph, 2nd line

“firs” should be “first”

2008-03-14
100SUGGEST

2nd paragraph, first line:

Currently reads:
“We’ll also specify one optional parameter, showform to tell Facebook…”

How about adding another comma after “showform”?

2008-03-14
100TYPO

First and third code samples:

First code sample uses the id string “User_#{@user.id}” while the second uses the id string “User:#{@user.id}”.

I assume these should be consistent?

2008-03-14
100TYPO

3rd paragraph is confusing. Facebook makes several requests to our battles page during the posting process? I can’t tell what is going on in the communication between facebook and my application by reading the description in this paragraph.

2008-03-14
100TYPO

2nd-to-last paragraph, 3rd line:

“comments our posted” should be “comments are posted” (our->are)

2008-03-14
100SUGGEST

I can’t tell from the description on this page if I will be able to access the comments in a comments or discussion tag, say, by using the REST or FQL apis. I get the sense that I can’t. Maybe talk about this?

2008-03-14
101TYPO

2nd code sample, 4th line:

‘and’ is colored like a keyword, but here it’s just part of a normal sentence.

2008-03-14
102TYPO

End of 3rd paragraph:

Last two words are run together: “content_forblock” should be “content_for block”

2008-03-14
102SUGGEST

2nd-to-last paragraph:

Currently reads:
“That takes care of the invitation, now we just need to correctly set the sensei of our users when they join.”

Would this be better if the comma after “invitation” is replaced with a semicolon?

2008-03-14
104TYPO

3rd paragraph, 2nd line:

“We’ll start by looking what happens” should be “We’ll start by looking at what happens” (add ‘at’)

2008-03-14
110TYPO

2nd paragraph, last full line:

“into users’ our profile area we can” should be “into users’ profile areas we can” (remove ‘our’, area->areas)

2008-03-14
110TYPO

3rd paragraph, 3rd line:

Currently reads:
“Since then, we’ve built quite a lot of functionality. It’s time to update our the profile to show what we’ve done.”

Eh? Time to update the users’ profiles? Time to update our profile fbml code? Besides the grammatical error, this could use some kind of clarifying fix.

2008-03-14
112TYPO

Footnote 5:

“Rails image_tag helper” should be “Rails’ image_tag helper” (add apostrophe)

2008-03-14
115TYPO

2nd-to-last paragraph, 1st line:

“users profile” should be “user’s profile” or possibly “users’ profiles”

2008-03-14
115TYPO

2nd-to-last paragraph, 2nd line:

“links that’s show up” should be “links that show up”

2008-03-14
116TYPO

2nd text paragraph, last full line:

“which will discuss shortly” should be “which we’ll discuss shortly”

2008-03-14
117SUGGEST

3rd paragraph, 2nd line:

Currently reads:
we can use the special Facebook id, “profileowner” to reflect…

Suggestion: add a comma after “profileowner”

2008-03-14
117TYPO

Last paragraph before start of “Mobile Profiles” section:

“profile’s of user’s” should be “profiles of users”

2008-03-14
118TYPO

2nd paragraph, 3rd line:

“we need to set turn on an option” should be “we need to turn on an option” (remove ‘set’)

2008-03-14
119ERROR

Figure 7.5 is not referenced anywhere in the text

2008-03-14
120TYPO

Last paragraph:

“two big difference between” should be “two big differences between”

2008-03-14
121TYPO

Last paragraph, last full line:

“run our application as outside of Facebook” should be “run our application outside of Facebook” (remove ‘as’)

2008-03-14
11TYPO

In many ways, FunnWall’s users don’t even know that the application wasn’t built by Facebook.

should be FunWall

2008-03-19
17TYPO

As an applicatio developer, you’ll need to be aware of this

2008-03-19
125SUGGEST

End of last paragraph:

Replace “in to” with “into”

2008-04-07
127TYPO

First line after sidebar:

“Instead of the getting the value” should be “Instead of getting the value” (remove ‘the’)

2008-04-07
128TYPO

First text paragraph, first line:

“the the” (remove duplicate)

2008-04-07
128TYPO

Footnote 7, at bottom of page:

“setInnerXHML” should be “setInnerXHTML” (add missing ‘T’)

2008-04-07
129ERROR

Figure 9.2 is not referenced in the text

2008-04-07
129TYPO

Last paragraph, 3rd line:

Replace “pop up” with “popup” (This would be consistent with Figure 9.3 caption and text on page 130)

2008-04-07
129TYPO

Last paragraph, 3rd line:

Replace “pop up” with “popup” (This would be consistent with Figure 9.3 caption and text on page 130)

2008-04-07
129SUGGEST

Last paragraph, 4th line:

Remove comma following “Figure 9.3” in “center of the screen, shown in Figure 9.3, on the next page.”

2008-04-07
129SUGGEST

Last paragraph, last line:

Remove comma following “Figure 9.4” in “as shown in Figure 9.4, on the following page.”

2008-04-07
130SUGGEST

In the code sample, I assume the 3rd line…
d.setContext($(‘comment’));

…isn’t needed in the case of a popup dialog. Maybe mention something about this in a comment for clarity?

2008-04-07
131TYPO

First paragraph of section 9.2, 4th line:

“from it’s humble beginnings” should be “from its humble beginnings” (remove apostrophe)

2008-04-07
131SUGGEST

3rd paragraph of section 9.2, 2nd line:

I’m not sure if this comma-separated list is set off right:
“we’ll need to add three new attributes, clickrewriteurl, clickrewriteform and clickrewriteid to our submit button”

2008-04-07
131ERROR

The last sentence of the second-to-last paragraph on the page reads:
“This means using comments_url(:canvas=>true).”

The second line of the code sample that immediately follows reads:
“:clickrewriteurl=>comments_url(:canvas=>false),”

My guess is that the first is incorrect, and both should be “false”

2008-04-07
132SUGGEST

in “def create” code sample, line 4:

I’m not sure what “request.xhr?” is or does. If this was covered earlier, maybe a quick reminder?

2008-04-07
132SUGGEST

I don’t understand footnote 9 at the bottom of the page. Is this “newer style of handling AJAX” referring to a new convention in Rails 2.0? Or a new convention required by the Facebook platform? Or neither?

2008-04-07
133TYPO

2nd paragraph, 1st line:

“our form comment form” should be “our comment form”

2008-04-07
133SUGGEST

2nd paragraph, 2nd sentence:

Sentence reads,
“We’ll start by removing the Mock Ajax elements from the submit button.”

Is “elements” referring to XML attributes (and not XML elements)? If so, how about “attributes” instead?

2008-04-07
133TYPO

2nd paragraph, 4th line:

“requests musts go” should be “requests must go” (remove extra ‘s’)

2008-04-07
133TYPO

Last paragraph, 1st line:

“as implemented in by Facebook” should be “as implemented by Facebook”

2008-04-07
133TYPO

Last paragraph, 3rd line:

“a very simply abstraction” should be “a very simple abstraction”

2008-04-07
133TYPO

Last code sample, 4th line:

“do” is colored by syntax highlighting but is just part of a sentence (and part of a comment)

2008-04-07
134SUGGEST

2nd paragraph, 3rd-to-last line:

replace “many times where you need” with “many times when you need”

2008-04-07
135SUGGEST

3rd text paragraph, 3rd line:

In “sending complex data to a JavaScript method on your site”, replace “site” with “page”. This suggests more strongly that data is being sent to code running in a browser (‘page’) rather than a server (‘site’).

2008-04-07
135SUGGEST

Last paragraph, 2nd line:

Reword “an Ajax calling of Ajax.FBML”

Maybe something like “an Ajax call using type Ajax.FBML”?

2008-04-07
136ERROR

Last paragraph of the chapter starts, “Next, we’re going to turn our attention to performance.”

With the current chapter order shown, that would be two chapters later. The next chapter (chapter 10) appears to be about testing.

2008-04-07
12TYPO

FunnWall’s users don’t even know that the application wasn’t built by Facebook.

This was reported for B1 and was marked as fixed, but it seems it wasn’t…

2008-04-07
18TYPO

As an applicatio developer, you’ll need to be aware of this. It’s important to make sure it degrades nicely when a user limits its capabilities.

dunno, again, this wasn’t fixed in B2…

2008-04-07
12TYPO

Last sentence of the second paragraph of section 1.3:
“In many ways, FunnWall’s users ….”

It should be “FunWall’s users” (‘n’ vs. ‘nn’).

2008-04-07
34TYPO

In the last paragraph on the page (3rd in the “Creating the invitation form using FBML” section), it says “You should see something that looks lik Figure …”

“lik” vs “like”

2008-04-07
39ERROR

You use a helper method (link_to) in the new action. It causes a NoMethodError.

#{link_to ” Attach your friends, install Karate Poke“,
new_invitation_path(:from=>@user.to_s,:canvas=>true)}”

2008-04-07
24SUGGEST

In the sidebar “What if I don’t control my network”, it would be helpful if there was some discussion of what address facebook requests will come from. This would be useful in setting up a firewall on the public server, and the information is difficult to find elsewhere.

2008-04-07
0142SUGGEST

I have a suggestion regarding the layout of the content in the book. I realize this is somewhat late in the process, given the book is expected to be final this summer, but having worked with the book for the majority of my work time the last couple weeks, I feel this is very important.

Technical books are used largely as reference materials. Currently the book operates in a sequential ‘teacher’ sense, to show the readers the long ugly way to do it, and then show them the happy rails/facebooker way to do it. The problem with this approach, is that almost every concept is explained and refined 3-4 times in this book, and I’ve found that every time I look back to the book as a reference material, I have to waste time figuring out if this is the page where the author finally tells me the best way, or if it’s one of the many ‘unfinished’ versions.

This technique is fine in teaching environments where the education is sequential, but as I’ve said before, most people I know rarely read technical books from first to last page. They look for what they need, and then move on. Good example of this is The Rails Way, by Obie Fernandez. It’s practically a phone book, which is ridiculous, but it’s contents and index are comprehensive, and I know that if he teaches me something on one page, he’s not going to turn around and tell me there’s a better way to do it, 20 pages later(and then twice more).

Just my two cents. I’m still using the book, so please, don’t let this seem like I’m unhappy. I just feel that a reorganization of the same content could take this book to the next level of usability.

2008-05-14
140SUGGEST

2nd paragraph, 1st line:

Replace “in memory” with “in-memory”?

2008-05-14
141TYPO

2nd text paragraph, 2nd line:

“We’ll does this with an after save filter” should be “We’ll do this with an after_save filter”

(change “does” to “do” and add underscore between “after” and “save”, since it’s “after_save” in the code below)

2008-05-14
142TYPO

First paragraph of section 11.2, 7th line:

“action giving” should be “action caching”

2008-05-14
143SUGGEST

2nd paragraph, 7th line:

Change “page cached” to “page-cached”

2008-05-14
143TYPO

3rd paragraph, 1st line:

“we can page caches many more pages” should be “we can page cache many more pages” (caches -> cache)

2008-05-14
143SUGGEST

4th paragraph, 5th line:

change “the .” to “the tag.”

2008-05-14
143TYPO

5th paragraph, 1st line:

“page cacheing” should be “page caching”

2008-05-14
144SUGGEST

2nd paragraph, 1st line:

change “page cached” to “page-cached”

2008-05-14
144TYPO

2nd paragraph, 2nd-to-last line:

“Other pages, like our new attack form aren’t a good match”

should be:

“Other pages, like our new attack form, aren’t a good match”

(add comma after ‘form’)

2008-05-14
146TYPO

Last paragraph, 3rd line:

“takes two parameter” should be “takes two parameters”

2008-05-14
147SUGGEST

First paragraph, last line:

Last sentence reads, “There is no limitation to the content that can be stored in a ref, they can even contain other refs.”

This seems like it would read better if the comma were changed to a semicolon or dash, or a period.

2008-05-14
148TYPO

First paragraph of section 11.4, 3rd line:

“setting idle” should be “sitting idle”

2008-05-14
149TYPO

In the code example at the top of the page, the inner block’s parameter is missing the right-side ‘goalpost’ (pipe (|)):

@users.each do |user <— pipe character missing
update_profile_of(user)
end

2008-05-14
149SUGGEST

2nd text paragraph, first sentence:

Sentence reads, “The batch API can do more than just send data, you can also retrieve data.”

This sounds awkward to me. Maybe replace the comma with a semicolon, dash or period? And maybe replace “you” with “it”?

2008-05-14
150SUGGEST

Last paragraph, third line:

“I tried just about every system in existence, only to settle on using Starling”

Why the word “only”? Was starling under your nose the whole time? Is it somehow worse than the others?

Maybe something like this instead?

“I tried just about every system in existence and settled on Starling”

2008-05-14
152SUGGEST

First paragraph, last sentence:

The comma after “launch” seems awkward. Maybe a semicolon, dash, or new sentence?

2008-05-14
32TYPO

“that the request cam from somebody who knows our secret key”

in the bottom paragraph on page 32 about halfway down the word came is spelled “cam”

2008-05-14
67SUGGEST

The more idiomatic way of doing (hits.size==1 ? “hit” : “hits”) is pluralize(hits, ‘hit’)

2008-05-14
61SUGGEST

I agree with Brian Artiaco’s suggestion. I find the “do it like this, oh wait, nevermind, do it like this” method to be annoying. Also, the whole bit about adding indexes can be dropped. This isn’t a book about performance tuning Rails, people either have or will learn those techniques from other sources. If you think the indexes should be there, mention it when the tables are created, otherwise skip it.

2008-05-14
46SUGGEST

Rather than mess around with 64-bit integers, why not just store the facebook_id as a string?

2008-05-14
73TYPO

<% fb_tab do %> should be <% fb_tabs do %>

2008-05-14
12TYPO

Paragraph 2: Your application has access to no
only information about its users, but also their friends.

Should be Your application has access to not
only information about its users, but also their friends.

2008-05-14
13TYPO

enourmous should be enormous (toward bottom of page) in this sentence: small difference in your appli-
cation’s viral coefficient makes an enourmous difference in how your
application spreads

2008-05-14
27SUGGEST

I think you should tell the user to start the server with script/server

2008-05-14
32TYPO

It says: “it proves that the request cam from somebody”. It should say: “it proves that the request
caem from somebody”

2008-05-14
34SUGGEST

I think you should tell to modify the routes specifically in the routes.rb file\t\t\t\t

2008-05-14
34TYPO

I think you should warn the readers about inserting the map.resources :invitations line before the default routing.

2008-05-14
37TYPO

at

<fb:request-form
action=“<invitations_path>”

we should read

<fb:request-form
action=“<new_invitations_path>”

2008-05-14
8SUGGEST

I saw my name on the acknowledgements page. Thanks for the mention :)

2008-06-30
8TYPO

3rd paragraph, last 2 lines:

“and rest of Facebooker community” should be “and the rest of the Facebooker community”

2008-06-30
9TYPO

Last correction was a mistake…

Occurs twice in 2nd paragraph, 1st line and again in 3rd line:

“let’s you” should be “lets you”

2008-06-30
10TYPO

3rd paragraph:

“recipients profile” should be “recipient’s profile” (add apostrophe)

2008-06-30
10TYPO

2nd to last paragraph, 2nd line:

“click on it and been taken” should be “click on it and be taken” (been -> be)

2008-06-30
10TYPO

2nd to last paragraph:

“verify your email address third click.” should either take out “third click” or turn that into a new thought about the third click.

2008-06-30
12TYPO

2nd paragraph, 3rd to last line:

“Gifts is a hugely successful application .” has an extra space at the end

2008-06-30
12SUGGEST

Last paragraph:

Maybe hyphenate the phrases “Facebook specific” and “ActionMailer like”?

2008-06-30
13TYPO

3rd paragraph, 2nd line:

“whichis” should be “which is”

2008-06-30
13SUGGEST

5th paragraph, 3rd line:

Maybe change “it would be helpful if you had at least used Facebook briefly” to “it would be helpful if you have at least used Facebook briefly”? (had -> have)

2008-06-30
14SUGGEST

Maybe hyphenate “Facebook specific”? (Occurs twice in second paragraph)

2008-06-30
14TYPO

Fourth paragraph:

2nd to last sentence has an extra space at the end.

2008-06-30
19TYPO

4th paragraph, 3rd line:

Doesn’t seem like “Request” should be capitalized in “A Request is just a message […]”

2008-06-30
20TYPO

Last paragraph, 4th line:

“portion your Facebook application” should be “portion of your Facebook application”

2008-06-30
22TYPO

2nd paragraph of section 1.4, 4th line:

“let’s you configure” should be “lets you configure”

2008-06-30
26TYPO

Last paragraph, 3rd line:

Looks like an extra double-quote mark right before “Can”

2008-06-30
26TYPO

Last paragraph, 4th line:

“and the select Users” should be “and select Users”

2008-06-30
28SUGGEST

2nd paragraph, last line:

Maybe change the comma after “ask for help” to something else?

2008-06-30
28TYPO

2nd to last paragraph, 3rd to last line:

“One” shouldn’t be capitalized

2008-06-30
28SUGGEST

Last paragraph, 2nd to last line:

Maybe change “Log in to your new Facebook user” to “Log in to your new Facebook account”? (user -> account)

2008-06-30
32TYPO

Last paragraph, 3rd line:

Change “It then add our Secred Key” to “It then adds our Secret Key” (add -> adds)

2008-06-30
34ERROR

The first code sample on this page didn’t work for me until I changed this line:

map.resources :invitations

…to this:

map.resources :invitations, :conditions => { :canvas => true }

2008-06-30
34TYPO

Last line of last paragraph:

“when Facebook process your page” should be “when Facebook processes your page” (process -> processes)

2008-06-30
38TYPO

In the fourth text paragraph, I’m not sure if the beginning of a parenthetical thought should be capitalized as “We’ll” is, so I’m mentioning it just in case.

The comma at the end of the same parenthetical phrase doesn’t look right to me either.

2008-06-30
39SUGGEST

For the first code example on the page, maybe make it a little clearer which file we are talking about?

2008-06-30
40TYPO

2nd to last paragraph, 3rd line:

I think “effect it” should be “affect it”

2008-06-30
40SUGGEST

Last paragraph, last sentence:

Maybe change first comma after “Don’t feel bad” to something else?

2008-06-30
41TYPO

In the footnote:

“looks like regular Ruby object” should be “looks like a regular Ruby object”

2008-06-30
42TYPO

Last paragraph:

“We’ll need some a better way” should be “We’ll need a better way”

2008-06-30
42SUGGEST

Last paragraph, last line:

Change “clean up” to “cleanup”

2008-06-30
43TYPO

First code example, 4th line:

“Install Karate Poke now..” has an extraneous period at the end

2008-06-30
43TYPO

First code example, 2nd to last line:

No space between function arguments
(just a style thing)

2008-06-30
44TYPO

Long comment in first code example, 2nd line:

No space between url and start of next sentence (“You”)

2008-06-30
45TYPO

Summary paragraph, 3rd line:

“our users profiles” should be “our users’ profiles”

2008-06-30
48SUGGEST

Sidebar about MySQL and 64bit IDs doesn’t mention SQLite. Since Rails has switched to using SQLite by default, I’m left wondering whether or not this issue also applies to SQLite.

2008-06-30
51TYPO

2nd paragraph starts with a lowercase (“we”)

2008-06-30
52SUGGEST

3rd to last paragraph, 2nd line:

I’m not sure whether “Secure_with!()” should be capitalized. It does start a sentence, but it is also referring to code and set off in a “this is code” font…

2008-06-30
55SUGGEST

Not sure if you have a style guide about spaces after commas in code, but it seems to be done both ways in various spots. Both styles show up on this page.

2008-06-30
65SUGGEST

Last paragraph of sidebar, 2nd line:

Maybe hyphenate “Facebook specific”?

2008-06-30
30SUGGEST

3rd paragraph, 2nd/3rd lines:

Maybe change “let another know” to “let another user know”

2008-06-30
31TYPO

First paragraph, 5th line:

“install the Facebooker.” could be “install Facebooker.” instead

2008-06-30
35SUGGEST

When running this application for the first time, you don’t see the invitation page - you see the installation page, because you added the “ensure_application_is_installed_by_facebook_user” filter.

Once the user clicks through that, they’re not taken to the invitation page, unless that happens to be the post-add url. So, you’ll only see the invitation page if you install the app and then visit the invitations/new url.

This is a minor thing, but it differs a little from the narrative.

2008-06-30
34SUGGEST

My earlier comment about needing :canvas => true isn’t quite right after all. I wasn’t doing quite the same thing (I was using RESTful scaffolding)

2008-06-30
39TYPO

In the last code example on this page, the ‘\\’ at the end of the first line seems to be intended to mark a line continuation. However, it is inside a quoted string that is displayed to users, so it shows up in the invitation messages.

Removing this line continuation backslash (and the other one two lines down) seems to work for me just fine.

2008-06-30
45ERROR

In the last paragraph, “even” comes up twice on the third line and sounds awkward.

2008-06-30
49ERROR

Text says, “use a method called current_user() to represent the currently logged in user” but in the code below, it looks like we’re creating an attribute called current_user, not a method.

2008-06-30
49SUGGEST

My previous submission for page 49 is wrong I think. It looks like the helper_attr call adds the method I was wondering about.

(I wish I could edit or remove errata submissions after the fact)

2008-06-30
33SUGGEST

The reader is told to do script/generate session_migration to create the tables. You should to tell them to create/migrate the database as well or they will have migration files with no database.

2008-06-30
10TYPO

4th paragraph: need a comma to separate “little application, but it demonstrates”

2008-06-30
31ERROR

The provided instructions currently don’t work on a plain vanilla developer machine, because facebookr requires the json gem to be installed in order to load properly. Otherwise the server doesn’t start up with a “undefined method `options’ for []:Array (NoMethodError)” error. Workaround: “gem install json”.

2008-06-30
31ERROR

in the script/plugin install example, the lines
+ ./CHANGELOG.txt
+ ./COPYING
are part of the output, not the command.

2008-06-30
31SUGGEST

In the discussion of setting up config/facebooker.yml, it would be helpful to show an example. I had to look at the facebooker_tutorial to understand exactly what was wanted for the canvas_page_name and callback_url.

2008-06-30
33SUGGEST

At the end of section 2.1, it would be a good idea for readers to run script/server and verify that they can hit the home page and display the application environment. That will get them to debug any database or gem setup issues before starting to deal with facebookr itself.

2008-07-28
38ERROR

In the first create.erb example, the tags are missing.

2008-06-30
38ERROR

In the second create.erb example, the fb:profile-pic and fb:name tags are not closed. This prevented the name from showing up. This worked:

<% for id in @sent_to_ids %>


<% end %>

2008-06-30
42ERROR

In the top new action sample, the call to link_to blows up with “NoMethodError (undefined method `link_to’ for #)”.

Workaround is to make the example more like the partial below, like this:
@user.profile_fbml =
I was sent here by ” +

2008-06-30
43ERROR

The two code blocks do not seem strictly comparable.
1. Only the bottom block contains the fbml tags.
2. Only the top block includes the code for the fb_req_choice Attack action.

2008-06-30
52SUGGEST

Using facebook_session as a method parameter in the first snippet and the name of a method in the second snippet is confusing. It took me a little while to figure out what was going on. Perhaps add a comment on the facebook_session method to say “used to return the Facebookr::Session object outside the context of a request”.

2008-06-30
61TYPO

Needs an apostrophe in “user’s” at “First, we find all of the user’s friends”

2008-06-30
52SUGGEST

It would be nice to explain the effect of the 1.day.from_now parameter to secure_with!.

2008-06-30
61SUGGEST

Is there a reason that potential_disciples couldn’t do this in one step with:

:conditions=>[“facebook_id in (?) and sensei_id is null”

ie, why not find the user’s friends who don’t have a sensei.

2008-06-30
63ERROR

The sentence about creating a Facebooker::Session object using the new method should really be about creating a Facebooker::User object, since that’s the type of object created in the hometown method.

2008-06-30
63SUGGEST

After reading and re-reading this section, I’m still unclear on the notion of what the Facebook session really provides to the User object. The Facebooker::User object is instantiated with a facebook_id, so why does it need the current session? Would it be an error if the current session was from a different user? I would have thought that we wanted to use the session_id stored in the User model instead.

Generally, I’m just still unclear on exactly what this Facebook session is and does.

2008-06-30
37ERROR

action=“<invitations_path>” will send you to ./invitations, not ./invitations/create, so either rename create.erb to index.erb or do action=“<invitations_path>/create”

2008-06-30
56SUGGEST

You suggest to modify a migration in plain text. This is difficult to spot sometimes for readers who are skimming through the sections. Maybe a little box on the side to indicate that you need to do something?

This also occurs on page 60.

2008-07-28
17ERROR

The suggested URL does not match the figure. You have to click through the “Page built by Karate Poke” to access the page that then allows you to add the application.

2008-06-30
71ERROR

in the test_valid_create test, a comma is needed on after the ‘:create’.

So: facebook_post :create :ids=>[‘1234’]
becomes: facebook_post :create, :id => [‘1234’]

2008-06-30
42TYPO

the code in the before moving to a partial is different than stated. It is missing a link_to that links to new_invitation_url.

2008-07-28
52TYPO

additional second parameter “facebook_session” being passed to “for” method without explanation.

2008-07-28
31ERROR

There appears to be no ‘facebook_get’ defined in facebooker/lib/facebooker/rails/test_helpers.rb that was in the svn repository (I verified that I did have the latest version available).

Switching to the github repository fixed this issue, but if the svn repository is no longer going to be maintained, it probably shouldn’t be referenced as the install method.

2008-07-28
74TYPO

The “test_valid_create” function has a missing comma in line 2:
facebook_post :create :ids=>[“1234”]

should read:
facebook_post :create, :ids=>[“1234”]

2008-07-28
15SUGGEST

Footnote says, “Rails 2.1 was released while this book is in development” (instead of “was in development”)

Maybe that’s intentional and will change at printing, but it sounded funny so there :)

2008-07-28
16SUGGEST

2nd line: “ActionMailer like” seems to me like it should be hyphenated. This happens for a bunch of similar word combinations throughout the rest of the book, so maybe it is a deliberate stylistic choice. I’ll try to skip mentioning the rest.

2008-07-28
17TYPO

3rd-to-last line:

“advanced notice” should be “advance notice”

2008-07-28
18TYPO

2nd line: “advanced notice” instead of “advance notice” again. Maybe it’s deliberate and correct?

2008-07-28
21SUGGEST

2nd paragraph of section 1.2 talks about navigation on the left side of the page. That goes out with Facebook’s redesign, so it gets a mention here.

2008-07-28
24SUGGEST

Near start of text:

“When a user requests a page from Facebook, they send the request on to you.” might be improved a little if reworded to remove the ambiguous ‘they’.

Maybe:
“When a user requests a page from Facebook, Facebook sends the request on to you.”
or:
“Users request pages from Facebook, which sends the requests on to you.”

2008-07-28
25SUGGEST

End of 2nd paragraph of section 1.4 mentions “application area in the upper left of every Facebook page.” (gone in redesign)

2008-07-28
27TYPO

2nd paragraph, 3rd line: “contains huge number” should be “contains a huge number”

2008-07-28
27SUGGEST

3rd paragraph discusses the need to make a local app visible on the net to develop. I know that Facebook recently open-sourced their software, explicitly mentioning a possibility of testing locally. I don’t know what, if anything (eg convenient tools) has come of this, and I know that this has no bearing on the rest of the book, but I’m bringing it up here as a suggestion to put it on the radar.

2008-07-28
29TYPO

In footnote, “Facebook have problems” should be "Facebook will have problems.

2008-07-28
30TYPO

Period missing at end of 1st paragraph

2008-07-28
32TYPO

2nd to last line: “accidently” should be “accidentally”

2008-07-28
35SUGGEST

In 2nd paragraph, it’s a little odd that “your application” in 1st line is “our application” in 3rd line.

2008-07-28
35TYPO

4th paragraph, 2nd sentence: “It then add” should be “It then adds”

2008-07-28
35TYPO

In last paragraph, a section reads:

We also know that the request wasn’t changed after it was sent (If the request was changed, the signatures wouldn’t match.) If they don’t match, then we know that the key the sender used to calculate the signature doesn’t match our key.

Suggested replacement (removing the parentheses, which seem to contain a new sentence that is then referenced after the close-parentheses, breaking the flow when the parentheses are skipped):

We also know that the request wasn’t changed after it was sent; if the request was changed, the signatures wouldn’t match. If they don’t match, then we know that the key the sender used to calculate the signature doesn’t match our key.

2008-07-28
36TYPO

Paragraph ends with “environment.rb” without a final period.

2008-07-28
37TYPO

3rd sentence: “REST principals” should be “REST principles”

2008-07-28
37SUGGEST

Before the first code example on this page, it would be nice to briefly mention what we are changing in the file to get it to the state shown, in case the reader doesn’t know offhand what routes.rb contains by default.

2008-07-28
37SUGGEST

A couple of the tags in the second code example aren’t syntax highlighted. In the case of fb:request-form, this makes the tag not match its closing tag in that regard. There are many similar instances throughout the rest of the book; I’ll try not to bring this up again.

2008-07-28
37TYPO

Footnote 5: “convetion” should be “convention”

2008-07-28
38SUGGEST

On 4th line, maybe put ‘add’ in quotes or a different font?

2008-07-28
39TYPO

The discussion on this page leaves me still a little confused about the “invite” attribute in the example on page 37. It isn’t mentioned at all.
This attribute is what causes invitations to be sent, right? I’m curious how it works. What does it cause to be sent to facebook when the form is submitted? What is its effect on the html form that gets generated? I don’t have a good mental picture of the invitation process, and what is sent by whom.

2008-07-28
41TYPO

It can be confusing at times to follow the progression of the code examples as we skip from one file in our project to another. A great example is on this page when, near the top, it says, “Rails is going to try to render create.erb, so let’s create that file here.” (where?)

One possible solution to this general problem would be some subtle design element in the book for labeling all code snippets with the file in our project they relate to. The download links give good context for this, but they’re not on most of the code snippets.

Most of the time, it is possible to follow the flow easily if the reader is paying good attention, but this particular instance is one where that falls down a little. Labeling the snippets somehow would make it easy to know immediately where we are without reading for surrounding context.

In a similar vein, it would be nice if there were some indicator that made it possible to know at a glance whether a code snippet is the final version in a series of improvements, or merely a step along the way. A pointer in the margin to the page number with the final version may also make things easier when referring back to things later.

2008-07-28
42TYPO

Missing period at end of 3rd paragraph

2008-07-28
42SUGGEST

4th paragraph: Maybe change “we can use the new_invitation_url() as URL” to “we can use the new_invitation_url() as the url attribute”?

2008-07-28
43SUGGEST

Single-sentence paragraph reads: “Some values, like profile_fbml can be changed as well”

Maybe a comma after “profile_fbml”?

2008-07-28
43SUGGEST

Footnote 9 is cut off and finishes two pages later…

2008-07-28
44SUGGEST

Section in 3rd paragraph reads,

“For instance, if each new user invites three of their friends to join, you have a viral coefficient of 3.0.”

This is minor, but the above isn’t true unless those friends accept. Could change “invites” to “convinces” and it would hold.

2008-07-28
45TYPO

Odd indentation in code examples. For example, the 2nd-to-last line (starting “@from_user_id”) is indented two different ways in the two code examples on the page.

There are other funny indentations throughout; I’ll try not to mention it again.

2008-07-28
45SUGGEST

At this point in the book, I’m already wondering if Facebook API calls can be run on a separate thread, out of the flow of responding to page requests.

This ends up being addressed on the second-to-last page of the book (173). Maybe that could be referenced in this section (perhaps the last paragraph, on page 46, which gets close), so that a reader with this question can more easily find the answer. Ditto for section 6.5.

2008-07-28
46SUGGEST

In the first code example, I notice the absence of any analog of “invite=true”. Is a multi_friend_request in Facebooker always an invite?

2008-07-28
46ERROR

I’m wondering if the second code example is showing what it should be showing. The “content” attribute is the version with a short string, rather than the long, complex one from page 42.

2008-07-28
47TYPO

Last sentence: “We can use the fb_name() and fb_profile_pic() instead.”

How about: “We can use the fb_name() and fb_profile_pic() helpers instead.”

2008-07-28
50ERROR

3rd paragraph starts: “Now we just need to create the migration.”

We just did that when we ran script/generate immediately above, right?

How about “add to” instead of “create”?

2008-07-28
51TYPO

In the sidebar, a sentence about SQLite got pasted into the middle of a sentence about MySQL, right between the word “plugin” and the asterisk that should be on the word “plugin”.

2008-07-28
51SUGGEST

In footnote 1 at bottom of page, how about “any of the Rails or Facebooker documentation” instead of “any of the Rails documentation” since the method in question refers to Facebook

2008-07-28
53TYPO

At end of 2nd paragraph, change “their users” to “its users”.

2008-07-28
53TYPO

3rd paragraph, 3rd line: “a users friend list” should be “a user’s friend list” (add apostrophe)

2008-07-28
53TYPO

3rd paragraph, 5th line: change “their users” to “its users”

2008-07-28
54TYPO

code sample at bottom has “end” indented too much

2008-07-28
56SUGGEST

Don’t think the text references figure 3.1 anywhere

2008-07-28
61TYPO

Right under “Integrating our belts” header, “We’ge” should be “We’ve”

2008-07-28
64TYPO

Re: 2nd paragraph and the following code sample.

Are we going to have entries in the User table for people that have not added the application? How would they get there? It looks like we’re looking for exactly this when we run a User.find(…) seeking them out.

2008-07-28
64TYPO

In last paragraph on page, I’m thinking “albums” should be “names”. I don’t think albums are mentioned at all leading up to this.

2008-07-28
66SUGGEST

First line, how about “display a user’s hometown” instead of “display their hometown”

2008-07-28
66TYPO

3rd paragraph, 2nd line: “Facebook doesn’t have a session to use for fetching data.”

Change “Facebook” to “Facebooker”

2008-07-28
67TYPO

First paragraph in “Joe Asks” sidebar: “impossible next to Facebook” should be “impossible without Facebook”

2008-07-28
67TYPO

Sidebar, 2nd paragraph, starting on 3rd line: “other application” should be “other applications”

2008-07-28
67SUGGEST

Section 3.8, 2nd paragraph, 5th line: How about changing “wasn’t bad enough” to “isn’t bad enough”

2008-07-28
67SUGGEST

Figure 3.2 on page 68 isn’t referenced in the text. The place to do that would be in 2nd paragraph of section 3.8 after, “your user will see an error”

2008-07-28
68TYPO

Figure 3.2 caption: “you application” should be “your application”

2008-07-28
68SUGGEST

Sidebar, 2nd paragraph, 2nd line: remove the word “just”?

2008-07-28
69SUGGEST

In the footnote here, and in some other places, you mention limitations of MySQL. I’m left wondering if MySQL gets more attention than the other big open source database, postgres, because you prefer MySQL and/or consider it more mainstream, or because MySQL has more limitations.

If you prefer one over the other based on experience, I’d be interested in knowing which one and why. If both have limitations worth mentioning, I’d be interested in knowing what the relevant limitations are for postgres.

2008-07-28
70TYPO

2nd paragraph, 2nd line: “object” should be “objects”

2008-07-28
70SUGGEST

2nd paragraph, 3rd line: The :include option on our relationships is really the :include option in our find() method right?

2008-07-28
70SUGGEST

Toward the end of this section, we have:

Finally, when we load a user in our for() method, we should load their belt and the next belt."

After the pattern of things like “I’ll waid while you run the migration”, I’m expecting some direction here! Something like, “Go ahead and make that change now.”

If, that is, we’re expected to have that done to keep up with the sample app.

2008-07-28
71SUGGEST

The last paragraph of this chapter reads awkwardly.

Currently:
“We’ll talk more about models in Chapter 4, Testing Our Facebook Application, on the following page. We’ve made good progress, but there’s still something we’ve been neglecting. With all the code we’ve written we still don’t have a single test. We’ll take care of that next.”

It’s like we ruin a surprise and then hint at the surprise. To fix it, maybe do something like,

“We’ve made good progress, but there’s still something we’ve been neglecting. With all the code we’ve written we still don’t have a single test. We’ll take care of that and talk some more about models in Chapter 4, Testing Our Facebook Application, on the following page. .”

2008-07-28
72TYPO

2nd line: “lets” should be “let’s”

2008-07-28
72TYPO

2nd-to-last line: “test ,” has an extra space before the comma

2008-07-28
74TYPO

2nd paragraph, 1st line: “we get error” should be “we get an error”

2008-07-28
74TYPO

2nd paragraph, 1st line: Might be better worded as:

Running that, we get the error "Expected response…

2008-07-28
74TYPO

2nd paragraph, 1st line: <:redirect> should be

In case tags get stripped from this space, the ‘redirect’ tag has a colon prefix but no “fb” before the colon.

2008-07-28
75TYPO

End of 2nd paragraph: missing period

2008-07-28
76TYPO

3rd paragraph, 1st line: “we want to more than just remove calls to the Facebook API” should be “we want to do more than just remove calls to the Facebook API”

2008-07-28
76TYPO

4th paragraph, 2nd line: “methods implementation” should be “method’s implementation”

2008-07-28
76TYPO

4th paragraph, 2nd line: “Mock also replace” should be “Mocks also replace”

2008-07-28
76SUGGEST

4th paragraph, 2nd line: redundant use of “also” sounds redundant

2008-07-28
76SUGGEST

4th paragraph, 3rd-to-last line: How about “parameters sent to each method” instead of “parameters sent to the method”

2008-07-28
76TYPO

Last paragraph: “update profile ,” has extra space before comma

2008-07-28
77TYPO

Start of 2nd paragraph: “That let’s use” should be “That lets us”

2008-07-28
77TYPO

2nd paragraph, 3rd line: “in mock objects terms” should be “in mock object terms”

2008-07-28
77TYPO

2nd paragraph, 4th line: “We’ve already use” should be “We’ve already used”

2008-07-28
78SUGGEST

3rd paragraph of section 4.2, 3rd line: Instead of “We can complete this area with” how about “We can complete this with”

2008-07-28
78SUGGEST

3rd paragraph of section 4.2, 2nd-to-last sentence could use rewording:

“First, we’ll test to make sure an attack is valid when all required fields are present.”

We’ll run the test when all the fields are present? Should be more clear that all fields must be present in order for the test to pass.

2008-07-28
79SUGGEST

2nd paragraph, 3rd sentence: How about starting sentence with “Therefore” or something to that effect

2008-07-28
79TYPO

3rd paragraph, 2nd line and again in last line: “then” should be “than”

2008-07-28
81SUGGEST

Start of section 5.1: “Before we can create our form, we’re going to need an attacks controller.”

What form? How about something like: “Let’s make a form for initiating attacks. Before we do that though, let’s make an attacks controller.”

2008-07-28
82SUGGEST

2nd paragraph. Going from first to second sentence feels like a non-sequitur. Maybe the first sentence (about the form being hard to use) could be moved to the following paragraph?

2008-07-28
82ERROR

In the second code example, the fb:multi-friend-input tag has no attribute giving :defending_user_id as the field name. I’m wondering if this is correct and, if so, how does that field’s value get bound to a field name when the form is submitted?

2008-07-28
82SUGGEST

Last paragraph: What controller is the new method going to be on? I think it’s the Attack controller, but it would help to be clear about it.

2008-07-28
83SUGGEST

I’m a little confused by the first code example on this page. It looks like we’re creating a new Attack object for the sole purpose of accessing its ‘move’ property, when the move property was one of the submitted fields in the Attack form we just wrote. Couldn’t we create a Move object instead?

Also, what is params[:attack] going to return? I don’t see a field by that name included in the form…

2008-07-28
84TYPO

Last paragraph, 2nd line: “flash(:error)” should be “flash[:error]”

2008-07-28
86SUGGEST

In first code example, the “Moves” label should be singular (“Move”). Also, to match figure 5.4, would that label and the “User to attack” label would need to end with colons? (Colons aren’t appended automatically are they?)

2008-07-28
86TYPO

3rd-to-last paragraph, 3rd line: Shouldn’t “fb_multi_friend_input() call” refer instead to the “ tag”?

2008-07-28
86ERROR

3rd-to-last paragraph: This paragraph seems to be comparing the code immediately above to code back on page 82, not to the first code sample on this page.

2008-07-28
87TYPO

opening div tag in view code is missing its closing angle bracket (‘>’)

2008-07-28
88SUGGEST

I’m wondering why we don’t have a ‘user’ resource for a user’s battles page. That seems like a more RESTful design than using the index action of an Attacks controller and passing a user_id parameter.

2008-07-28
89TYPO

2nd-to-last paragraph missing ending period

2008-07-28
90TYPO

Code has inconsistent spacing. Not a big deal but mentioning it anyway. Won’t mention again.

2008-07-28
91TYPO

Why are there fbml tags in the code example at the top? On page 48, we put them into application.erb

Is there still an application.erb at this point, or did that get moved to application.fbml.erb? If both of these exist, do both affect what is rendered in .fbml.erb views? Or just the latter one?

2008-07-28
91TYPO

2nd paragraph, first and last lines: Facebook’s “help” page is mentioned. Facebook actually calls this an “About” page. Also, calling it a “help” page could potentially cause it to be confused with the Help URL, which is one of the configurable settings the Developer application provides.

2008-07-28
91SUGGEST

2nd paragraph, last line: how about changing “on the right of our tab bar” to “on the right side of our tab bar”

2008-07-28
91ERROR

“help” page mentioned again in 3rd paragraph, 2nd line

2008-07-28
91TYPO

Last paragraph: “Facebook helpers” should be “Facebooker helpers”

2008-07-28
92SUGGEST

2nd-to-last paragraph of section 5.3, 2nd line. Reword “help links are placed on the right of the action link.” Maybe “on the right side of the dashboard.”?

2008-07-28
92SUGGEST

2nd-to-last paragraph of section 5.3, last line: are we removing just the dashboard action (and leaving the help link) or are we removing both actions? Or are we removing the dashboard entirely?

2008-07-28
93TYPO

h2 tag in code sample has no matching closing tag

2008-07-28
93TYPO

How about a question mark after “Do you want to attack

Also, the h3 tag has no closing tag. Adding these would match code on page 95.

2008-07-28
94SUGGEST

2nd paragraph, 2nd-to-last line: Change “In many ways FunWall’s users don’t even know…” to “Many of FunWall’s users don’t even know…”

2008-07-28
94SUGGEST

In 3rd paragraph, “themselves” is used twice and feels a little repetitive. The second could probably go.

2008-07-28
94TYPO

Last paragraph, 2nd line. Not sure why “User Interface” is capitalized.

2008-07-28
95TYPO

In figure 5.9 (which I don’t think is referred to in the text) “your” is used, but the code has the “useyou” attribute set to false. Do we want that for the following line too? (“Do you want to attack you”)

2008-07-28
96TYPO

Start of second paragraph: remove “the” in “Along with the”

2008-07-28
96TYPO

2nd paragraph, start of last line: how about “these” instead of “them”

2008-07-28
98SUGGEST

2nd paragraph: script/console is usually set in a different font to show that it is a command.

2008-07-28
98TYPO

3rd code sample: I’m curious what the will_paginate tag does. Does it display a page number label and a set of paging links? Does it do something else?

2008-07-28
98TYPO

3rd code sample: div is missing a closing ‘>’

2008-07-28
98TYPO

Last paragraph of sec 5.5: should ‘will_paginate’ be in a code-type font?

2008-07-28
99TYPO

2nd code sample: wondering about the ‘version=“1.1”’ attribute on the fbml tag, which shows up here and some other places in the book. Is this required when doing things like linking to external stylesheets or using FBJS? How do these fbml tags behave given that there are fbml tags in our application.fbml.erb file?

2008-07-28
100SUGGEST

3rd paragraph: another reason invitations aren’t good for sending messages is they’re only appropriate for users that haven’t yet installed the application. Or is this paragraph talking about requests?

2008-07-28
101SUGGEST

2nd paragraph: 2nd sentence makes me wonder if there’s an application-wide limit on # of invitations, or if there’s just the “per user” limit.

2008-07-28
102TYPO

End of 2nd paragraph: “…as we will see in Section 6.1” — hey, we’re in section 6.1 right now!

2008-07-28
102TYPO

First paragraph in in “Facebook Notifications” section, 3rd line: Start of sentence (“send_notification”) isn’t capitalized.

2008-07-28
102TYPO

2nd-to-last paragraph: change “interface to sending emails” to “interface for sending emails”

2008-07-28
103TYPO

2nd paragraph, 3rd line (“our recipients can be either one of our User ojects, a Facebooker::User…”)

How does Publisher know what to do with one of our User objects? And why is the ‘to’ case different than the ‘from’ case?

2008-07-28
103TYPO

End of 3rd paragraph: I’m wondering if the code we’re writing (create vs deliver) affects our testing. For instance, should we stay away from the ‘deliver’ variant if we want to write tests to exercise our code? Or is that not the right way to look at this? I’m having trouble picturing how tests are going to interact with notification/publisher-type code in our app.

2008-07-28
103TYPO

Footnote 2 at bottom of page has missing period

2008-07-28
104TYPO

“Joe Asks” sidebar, 1st paragraph line 2: Should a comma go inside parentheses like this?

2008-07-28
104SUGGEST

2nd paragraph in sidebar: maybe change “is to keep them engaged” to “is keeping your users engaged”

2008-07-28
105TYPO

Last line: “metric can be see in Figure” should be “metric can be seen in Figure”

2008-07-28
106SUGGEST

Start of text: Sentence spanned pages, so “the next page” is now this page!

2008-07-28
106SUGGEST

On sending notifications… it crossed my mind here that it’d be nice if we had a way of knowing if a person had read a notification yet. Then we could only send them another if they didn’t have a backlog of unread notifications. I’m guessing that’s not possible, though.

2008-07-28
107SUGGEST

2nd paragraph, 3rd line: change “as well as” to “and”

2008-07-28
107SUGGEST

2nd paragraph talks about actions and stories in newsfeeds. This will change a lot soon (multiple story sizes etc) so I’m going ahead and noting it here.

2008-07-28
107TYPO

End of 3rd paragraph has “from” duplicated (in two different fonts). Maybe remove the first one in the regular font?

2008-07-28
108TYPO

2nd-to-last line on page: “new feeds” should be “news feeds” (or possibly “newsfeeds”)

2008-07-28
109TYPO

Paragraph near top ends with “NewsFeed”. Inconsistent with earlier uses, in both the combined word and the capitalization.

2008-07-28
109TYPO

2nd paragraph: “ensure…” identifier runs off end of page.

2008-07-28
109TYPO

2nd paragraph, 2nd line: after long “ensure…” identifier, it should say “filter” (or “method” but I think “filter”)

2008-07-28
109SUGGEST

It’d be nice to encourage an approach of making “set_facebook_session” the rule and “ensure_application_is_installed_by_facebook_user” the rare exception

2008-07-28
109ERROR

In code example, why is User.for() being passed both an id and a facebook session? Doesn’t it just take an id? What does the second parameter do?

2008-07-28
110TYPO

End of 2nd paragraph and start of 3rd (and on next page): “newsfeed” used as a single word (it’s being written different ways in different places).

2008-07-28
111TYPO

Wondering if we’re looking at the right code in these examples. The example in the middle seems to belong in the prior example. In that example, the items in title_data don’t seem to be used.

2008-07-28
112TYPO

3rd paragraph, 2nd line: is “Templatized” supposed to be capitalized?

2008-07-28
112TYPO

Last paragraph, 3rd line: “templates” should be “template”

2008-07-28
117SUGGEST

2nd paragraph: how about rewriting “redirect the user back to the page they were viewing” as “redirect the user to the battles page the comment was added to”

2008-07-28
117SUGGEST

3rd code sample: Why are we back to “form_for” rather than using “facebook_form_for” (introduced back on pg 86)?

2008-07-28
117TYPO

4th paragraph (of five): “to the index.fbml.erb” should be “to index.fbml.erb”

2008-07-28
118TYPO

2nd paragraph of “Using the built-in comments” section, 3rd-to-last line:

closing angle bracket of fb:comments tag is in the wrong place, including the word ‘tag’ in the tag.

2008-07-28
118TYPO

2nd paragraph of “Using the built-in comments” section, 2nd-to-last line: string “User” doesn’t match code example farther down, which uses “User_#”

2008-07-28
118TYPO

3rd paragraph of “Using the built-in comments” section: change “canpost, candelete” to “canpost and candelete”

2008-07-28
118TYPO

3rd-to-last paragraph: in “Facebook will render a view all link”, maybe quote the “view all” or use a different font?

2008-07-28
118TYPO

Last line on page: “your may run into problems” should be “you may run into problems”

2008-07-28
119SUGGEST

2nd code example + description (“add the callbackurl parameter on our comments”): I don’t understand what this does, or why we might want it.

2008-07-28
119SUGGEST

General comment about code examples, inspired by tangents explored in this section:

It would be cool if a book provided a git repository with a tree of development branches including one-off or otherwise tangent examples to the main development path. That could give an extra dimention for readers exploring sample code!

2008-07-28
120ERROR

Code examples. In the first two examples on this page, I’m not sure why the “show_user_path(:id=>@user)” and “invitations_path” portions of the code are different. If they shouldn’t be different, I’m not sure which is correct.

2008-07-28
120TYPO

In first code example, “Install Karate Poke now..” has extra period

2008-07-28
121SUGGEST

In code sample, I’m confused about how the “invite_message” bit works. It looks like Facebooker is supposed to know to substitute that value for the content specified in the ‘content_for’ helper. Is this the case? It looks like it’s being used as an ordinary string…

2008-07-28
121SUGGEST

Last line on page: “hand” used twice. Feels a bit repetitive.

2008-07-28
122SUGGEST

Could be clearer that the method being written goes into the AttackPublisher class.

2008-07-28
122TYPO

opening div tag in view code missing closing angle bracket

2008-07-28
122TYPO

Last paragraph, 3rd-to-last line: “call deliver_profile_update method” should be “call the deliver_profile_update method”

2008-07-28
122SUGGEST

2nd-to-last line: How about using an underscore and code font for “after create”

2008-07-28
123TYPO

In first code sample, “attcking_user” should be “attacking_user”

2008-07-28
122SUGGEST

2nd paragraph: I think the bit about network-based profile urls is already somewhat out-of-date. I think facebook has moved away from network-based urls (I see www.facebook.com urls in profiles). The main point of this section still stands of course - the domain is different than apps.facebook.com, and links into our app should be absolute.

2008-07-28
123SUGGEST

2nd paragraph: change “links on our profile” to “links on our users’ profiles”

2008-07-28
123TYPO

2nd code example: div opening tag missing closing angle bracket.

2008-07-28
124SUGGEST

Header reads “The skinny and fat of profiles”. Wonder if you’re parodying the phrase “the skinny on ” in which case maybe “The skinny and fat on profiles” would fit…

2008-07-28
124SUGGEST

Discussion of profile box widths is obviously affected by redesign, although old profile boxes should still continue to work.

2008-07-28
124SUGGEST

3rd paragraph: change “Our existing profile looks fine” to “Our existing profile box looks fine”

2008-07-28
124TYPO

3rd paragraph, last line: “our user’s first names” should be “our users’ first names”

2008-07-28
124TYPO

div opening tags with class “battle” missing closing angle brackets (twice - once in ‘wide’ tag and once in ‘narrow’ tag)

2008-07-28
126TYPO

div tag in consolidated sample missing closing angle bracket

2008-07-28
126SUGGEST

Section on profile actions obsolete I think… pretty sure profile actions are going away.

2008-07-28
127TYPO

2nd paragraph: I think “attack_publisher/profile_action” should be “attack_publisher/_profile_action” (leading underscore - it’s a partial)

2008-07-28
128SUGGEST

3rd paragraph: I assume from the wording that the special “profileowner” id only applies when entering fbml into the developer application, and not any profile fbml that can be set through the api? Thought I would ask here since it isn’t totally clear.

2008-07-28
129SUGGEST

First two paragraphs: I’m confused by the use of both “fb:visible” and “fb:visible-to”

2008-07-28
129TYPO

2nd-to-last paragraph, 2nd-to-last line: I’m pretty sure “attacks_publisher_test.rb” should be “attack_publisher_test.rb”

2008-07-28
130SUGGEST

Is the " Congratulations! You’ve …" string used twice in the code samples supposed to be there? With that extra spacing?

2008-07-28
130TYPO

3rd paragraph, 2nd line: “verify .” has an extra space before the period.

2008-07-28
130TYPO

Last paragraph needs fixing:

“these tests only verify that the published messages looks like we expect it to. It doesn’t verify that the message will work correctly when sent to Facebook.”

instead:

“these tests only verify that the published messages look like we expect them to. They don’t verify that the messages will work correctly when sent to Facebook.”

2008-07-28
133SUGGEST

End of 2nd paragraph: it seems like it would be more correct if we change “whether a link comes from the Facebook canvas or not” to “whether a request comes via Facebook’s servers or not”.

2008-07-28
134SUGGEST

3rd paragraph, 2nd line: maybe “Sometimes” rather than “Some times”?

2008-07-28
134TYPO

2nd-to-last line: “all of our view” should be “all of our views”

2008-07-28
135TYPO

2nd paragraph, 1st line: “go to the /leaders” should be “go to /leaders”

2008-07-28
135TYPO

2nd paragraph, 3rd line: “We forget” should be “We forgot”

2008-07-28
135TYPO

2nd paragraph, 4th line: “our user’s don’t” should be “our users don’t”

2008-07-28
135TYPO

3rd paragraph, last line: should “Non-Facebook” be “non-Facebook”?

2008-07-28
135SUGGEST

4th paragraph, line 3: maybe change “different ways” to “in different ways”?

2008-07-28
136TYPO

2nd paragraph, 3rd-to-last line: “the Ajax we learned last chapter” actually doesn’t show up until the next chapter (making some of the javascript examples here a little more challenging!)

2008-07-28
137SUGGEST

We’re using ‘remote_form_for’. Curious if there’s something like “facebook_remote_form_for” that could be used in fbml pages in this situation?

2008-07-28
137SUGGEST

2nd paragraph: maybe change “add that in to” to “add that to”?

2008-07-28
137SUGGEST

2nd code sample with fb_if_is_user tag seems to end suddenly, and has no closing tag. If this is just supposed to be inserted above existing code, a line like “—rest of code—” might help.

2008-07-28
138TYPO

2nd paragraph, line 1: “how make” should be “how to make”

2008-07-28
138TYPO

On this page, IFrame is written as both “IFrame” and “iframe”

2008-07-28
138SUGGEST

3rd paragraph: wondering about rules for what urls can go in the fb:iframe tag. Any url? Also, it says, “Whe Facebook makes the request to your server…” If it’s an iframe, doesn’t the request come from the user’s browser? Does facebook use url rewriting or client-side javascript to affect the path the request takes, or the parameters that are sent to your server?

2008-07-28
138TYPO

3rd paragraph, 3rd-to-last line: “implement” should be “implements”

2008-07-28
138TYPO

3rd paragraph, 2nd-to-last line: “users browser” should be “user’s browser”

2008-07-28
139TYPO

2nd-to-last paragraph, last line: change “application” to “version”

2008-07-28
140TYPO

3rd line: “provides access the” should be “provides access to the”

2008-07-28
140ERROR

2nd paragraph, 3rd line: “requests from the originating server” should be “requests to the originating server”

2008-07-28
140TYPO

2nd paragraph, 4th line: change “help them work” to “help it work”

2008-07-28
140TYPO

Strange indentation in code sample

2008-07-28
140TYPO

4th paragraph, 2nd line: “It’s constructor” should be “Its constructor”

2008-07-28
141SUGGEST

Figure 7.2 is referenced in the first paragraph as an example of the alert dialog code that immediately follows. To me though, it looks like it is actually showing the next example down, after adding the suggestion of using a textarea element for debug output.

2008-07-28
141TYPO

First code example is missing the closing parenthesis and semicolon.

2008-07-28
141TYPO

Last paragraph, 2nd line: “users name” should be “user’s name”

2008-07-28
141TYPO

Last paragraph, 4th line: Instead of “three parameters,” how about “three parameters;” or “three parameters:”

2008-07-28
141TYPO

Last line of text: “You can seen” should be “You can see”

2008-07-28
142TYPO

2nd line of text: “javascript” used here, but in many other places it’s “JavaScript”…

2008-07-28
142TYPO

2nd paragraph, 3rd line: “convetion” should be “convention”

2008-07-28
142SUGGEST

End of 2nd paragraph: “the PHP library”
What PHP library? Facebook’s PHP library? Or is this supposed to say “the PHP language” or maybe a core PHP library?

2008-07-28
142TYPO

3rd paragraph, 2nd line: “a users friends” should be “a user’s friends”

2008-07-28
142TYPO

2nd code sample: I don’t think the braces match up here. There seems to be one more closing }); combination than opening.

2008-07-28
142TYPO

Last paragraph, first line: replace “an A” with “a”

2008-07-28
142TYPO

Last paragraph, 2nd line: why is User in caps?

2008-07-28
142TYPO

Last paragraph, 2nd line: “even even” (duplicates)

2008-07-28
142TYPO

Last paragraph, 1st line: “That returns a similar array to our last example”

…did the last example return an Array? I don’t think I followed it well enough to pick that out

2008-07-28
145TYPO

First paragraph that starts on this page, first line: “Firebug” has an extra space after it and before the superscript “3”

2008-07-28
146SUGGEST

End of 2nd paragraph: maybe change “same JavaScript as we would in” to “same JavaScript that we would use in”

2008-07-28
146SUGGEST

2nd code sample: fbml version=“1.1” attribute again. Sondering if this is needed to use FBJS and/or ajax

2008-07-28
147TYPO

2nd paragraph, 1st line: “with a call a5812…_$()” should be “with a call to a5812…_$()” (add ‘to’)

2008-07-28
147TYPO

3rd paragraph, 3rd line: “that can stored” should be “that can be stored”

2008-07-28
148SUGGEST

Last line: “links to invalid protocols are removed” - Invalid protocols? Like what protocols? Real protocols? Or invalid values in the protocol portion of a url? Curious what is behind this statement.

2008-07-28
149SUGGEST

2nd-to-last paragraph, 3rd line: “make sure that you are sending valid XHTML. If you try to send invalid XHTML…”

Should this be “set” instead of “send” since we’re talking about the setInnerXHTML method? Or is this referring to some data that is getting sent somewhere when you call this method? This leaves me somewhat confused.

2008-07-28
149SUGGEST

Footnote: “As of the time of writing, setInnerXHTML is still being tested and is subject to change or removal.”

…Wonder when this was written (or last checked) and what the status is…

2008-07-28
153TYPO

End of 3rd paragraph: "When using Ajax via Facebook, we always want to use URLs that point directly to our server. This means using comments_url(:canvas=>false).

This (and the code immediately below which implements it) makes sense, but I’m wondering whether this is different with Mock Ajax, the section we’re in. I don’t have a clear picture after reading it, but I’m guessing Mock Ajax involves routing all requests through facebook’s servers. If that’s true, we would want to set the ‘canvas’ parameter to true, right?

Also, later on page 155, it seems to imply that we are changing our earlier code by making the ‘canvas’ parameter false, ie flipping it from true to false.

I’m really not quite clear exactly what is going on here…

2008-07-28
154TYPO

2nd paragraph: “ajax” and “Ajax” both used. Capitalizing it seems to be the norm.

2008-07-28
154TYPO

2nd code sample: “if request.xhr”

This is probably more a rails question than a Facebooker question, but I’m a little unclear on what “request.xhr” does. It’s supposed to tell us if a browser’s XmlHttpRequest object made the request, right? But how is an “Ajax request” different from any other HTTP request? They’re all requests following the HTTP spec, right? Is there a particular field it checks to decide it’s dealing with an “Ajax request”?

Sorry, this has bothered me before…

2008-07-28
154SUGGEST

2nd code sample: “@comments=comment_receiver.comments(true)”

If it was explained earlier what the parameter to the comments method does, or what effect we get by passing ‘true’, I can’t remember. Maybe a comment would help?

2008-07-28
154SUGGEST

3rd paragraph, 2nd line: “Facebook will make an Ajax request to our server. Our server will send back just the comments area and Facebook will update the page.”

This is still the ‘Mock Ajax’ section, so is Facebook a go-between here for Ajax requests from the user’s browser? When “Facebook” is used, I’m not sure if we’re talking about Facebook’s servers, some client-side code from Facebook that runs in the browser, or a combination of the two.

2008-07-28
155SUGGEST

3rd paragraph, start of 2nd sentence: “It”

I can’t tell if “It” is referring to ‘Real Ajax’ or ‘Mock Ajax’ (both are mentioned in the prior sentence)

2008-07-28
156SUGGEST

3rd paragraph, 2nd line: How about deleting the phrase, “make a JSON request to”

2008-07-28
156SUGGEST

3rd paragraph, 5th line: change “request for JSON” to “request for JSON-formatted data”

2008-07-28
157TYPO

end of 1st line: “response” should be “responses”

2008-07-28
157SUGGEST

3rd line: “we can do this by prefixing the variable name with ”fbml".

So naming variables this way affects how they are processed? Or is it just a convention used in this particular piece of code? I’m not sure exactly what’s going on here.

2008-07-28
157TYPO

Last paragraph uses both “FBML” (first line) and “fbml” (last line)

2008-07-28
157SUGGEST

Last paragraph, 3rd line: change “show the larger image when the thumbnail is clicked” to “show a larger image when its thumbnail is clicked”

2008-07-28
158SUGGEST

I’m curious whether this sample causes the large image to be preloaded by the browser.

2008-07-28
159SUGGEST

A visual showing the relative delays imposed by facebook api calls, typical database queries, disk io, and calls to memcached would be cool for getting a sense of what kind of time scales we’re talking about in each case.

2008-07-28
160TYPO

4th paragraph, 2nd line: “patforms” should be “platforms”

2008-07-28
160TYPO

4th paragraph, 4th line: should “memcache-client” be “memcached-client”?

2008-07-28
160SUGGEST

End of 4th paragraph: change “make our User model cached” to “make our User model cacheable”

2008-07-28
160SUGGEST

4th and 5th paragraphs: sometimes “User” in code font, sometimes “user” in normal font. Looks funny sometimes.

2008-07-28
160TYPO

5th paragraph, 2nd line: put a comma after “get_cache”

2008-07-28
161TYPO

Why are the parens on the ‘returning’ method empty? And what then goes in the ‘user’ variable between the goalposts?

2008-07-28
161TYPO

2nd paragraph: “expire_cache” on third line, “expire cache” on 7th

2008-07-28
161TYPO

2nd paragraph, 3rd/4th lines: “memcache” should be “memcached”

2008-07-28
161SUGGEST

2nd paragraph, 3rd/4th from last lines: Why are our User objects cached this way by default? Is any property with a name ending in “id” used automatically in a hash key?

2008-07-28
161TYPO

Last code example on page: “cache_id” method returns its parameter unmodified and does nothing else (and the parameter also shares the name of the method, not sure if that is a problem). Should this return the value of facebook_id instead?

2008-07-28
162SUGGEST

2nd line: remove “as well”

2008-07-28
164TYPO

2nd line: “multi-server”
3rd line on next page: “multi server”

2008-07-28
164TYPO

End of 4th paragraph: “memcache” should be “memcached”

2008-07-28
164SUGGEST

2nd half of 4th paragraph: I’m curious why page caching with memcached isn’t possible. This text says we can do Action caching using memcached “because we are checking for cached content inside Ruby code”

Are we not running any Ruby code when there’s a page cache hit? If so, what kind of code are we running?

2008-07-28
164TYPO

Last paragraph and its code sample: This is for action caching, even though we’re using the term ‘fragment’?

2008-07-28
164TYPO

Footnote 7: “memcache” should be “memcached”

2008-07-28
165TYPO

3rd paragraph ends with extra space before period

2008-07-28
167SUGGEST

2nd paragraph, 3rd-to-last line: change “inside a Rails request” to “on a development server”

2008-07-28
167TYPO

4th paragraph, 2nd line: Should “Fragment” be capitalized? (not sure)

2008-07-28
168TYPO

3rd paragraph, 4th line: “in a similiar matter” should be “in a similar manner”

2008-07-28
168TYPO

4th paragraph, 5th line: “move” should be “movie”

2008-07-28
168TYPO

Last paragraph, 1st line: add comma after “FQL”

2008-07-28
168TYPO

Last paragraph, 2nd line: “look at alternative solution” should be “look at an alternative solution”

2008-07-28
169TYPO

“Hometown” and “hometown” each used at least twice on the page

2008-07-28
169SUGGEST

2nd paragraph, 3rd-to-last line: Should “WHERE” be “FROM” instead, since the FROM clause is where we list the tables we’re selecting from?

2008-07-28
169TYPO

Last paragraph, 2nd line: “sql_query” should be “fql_query” to match above code

2008-07-28
169SUGGEST

This may be a dumb question, but do the User objects we populate from the results of our FQL request have only some of their fields populated (the fields we requested)? And is the default state of the User object have none of the fields populated? So that if you ask for a field that isn’t populated, it automatically makes a Facebook API request to get the value?

2008-07-28
170TYPO

2nd paragraph, 2nd line: Should “WHERE” be “FROM”? (same question as on previous page)

2008-07-28
171TYPO

“Batch” and “batch” both used…

2008-07-28
171SUGGEST

End of second paragraph: change “return the results” to “return a JSON-encoded array with the results”

2008-07-28
171SUGGEST

5th paragraph, 4th line: change “location” to “locations”

2008-07-28
171TYPO

5th paragraph ends without a period

2008-07-28
171ERROR

2nd code sample: seems like User.new(facebook_id) should say User.new(user) based on above “@users.each do |user|”

2008-07-28
173TYPO

Last full paragraph, 4th-to-last line: capitalize “facebook”

2008-07-28
174TYPO

3rd paragraph, 4th line: change “to measure” to “measuring”

2008-07-28
174TYPO

4th paragraph, 4th line: change “and to put” to “and put” or “and how to put”

2008-07-28
174TYPO

5th paragraph, 1st line: space after period and before superscript 15

2008-07-28
174SUGGEST

Last paragraph, 2nd line: should “You’ll get updates about the new Facebook functionality” say, “You’ll get updates about the new Facebooker functionality”? After all, you can get the former straight from Facebook!

2008-07-28
174TYPO

Need space in footnote 15 between “at” and the url for the Facebook page.

2008-07-28
74TYPO

The latest version of facebooker TestHelper appears to define assert_facebook_redirect_to instead of assert_fb_redirect_to

2008-07-28
55ERROR

Paragraph 2 states the ruby conditional assignement operator “runs the right hand side of the expression and assigns it to a variable only if the variable isn’t already set”

This is not exactly true, the right hand side is not run if the variable is already set.

2008-07-28
141ERROR

The method call Facebooker.api_key should be Facebooker::Session.api_key

2008-07-28
26SUGGEST

The last image, of the application/developer page, shows key and secret.

That’s not the actual secret, is it ?

You appear to have been careful to overwrite it elsewhere.

2008-07-28
30ERROR

In ‘Dealing with errors ’ you might mention the authentication error.

I am getting it as follows “ActionController::InvalidAuthenticityToken”.

My workaround has been to comment in the application controller the line “protect_from_forgery”

2008-07-28
45TYPO

rogue “}” on line wiht “new_invitation_url”

2008-07-28
45TYPO

after accepting the invitation and allowing the app to use my data, i am sent to my profile page, not the invitation page

2008-07-28
39SUGGEST

might be useful to note for beginners that ‘homepage’ means /home.php, i was looking for the app invites in the ‘notifications’ thing on the profile page :D

2008-07-28
36TYPO

“protect_from_forgery :secret => ….” causes authentication issues on my application, had to commennt it out

2008-08-07
50ERROR

the limit 8 didn’t do anything for the datatype in my mysql database.

i upped the limit to 20, and it automatically assigned the integer as a bigint.

2008-08-07
51ERROR

the facebook and 63bit ints just seems wrong

from what i can glean from the mysql docs, the limit character is used to limit the number of digits. thus limiting to 8 means always a normal int

i had to up the limit to 20 to get a bigint (something above 11 or 12 would probably have done it)

i didn’t need the plugin mentioned it appears.

2008-08-07
84TYPO

re “the facebook_messages( ) helper to display the flash as a Facebook message.”

actually, it appears only to display flash[:notice]

2008-08-07
88TYPO

i’ve actually started used fb_name id, :useyou => false, :linked => false and it’s find, contrary to the footnote, though i haven’t yet wrapped it in a link_to

2008-08-07
13TYPO

3rd paragraph, last sentence: “The flower you send starts as just a sprout and grows over four days in the recipients’ profile.”
I think that should be “recipient’s profile.” (move apostrophe)

2008-08-07
13ERROR

Last paragraph: ‘You are then prompted to install the Growing Gifts application. You click on “Add Growing Gifts”…’
I think this describes the old behavior. Now facebook asks the user to “Allow Access” with an “Allow” button, as shown on page 21 and described on page 20.

2008-08-07
15TYPO

2nd-to-last paragraph: “Facebooker is not the first Ruby interface to Facebook, that honor belongs to RFacebook.”
I think the comma should be a dash or semicolon.

2008-08-07
20TYPO

The first three paragraphs on this page are a rehash of the three paragraphs on the previous page (19). It looks like the section was reworked a little and we’re reading two versions of it, one after the other.

2008-08-07
20TYPO

First sentence of section 1.1: “go to a url for Karate Poke.”
How about “go to THE url for Karate Poke.”

2008-08-07
21TYPO

End of 1st paragraph of section 1.2 has an extra double quote character that doesn’t belong.

2008-08-07
21TYPO

Last paragraph: “You don’t need to know much about canvas yet, though”
Should be: “You don’t need to know much about THE canvas yet, though”

2008-08-07
21TYPO

Bottom of page: “one of your friend’s names” should be “one of your friends’ names” (move apostrophe)

2008-08-07
23TYPO

Caption on Figure 1.3 has an extraneous single quote at the end.

2008-08-07
24TYPO

The first paragraph on this page has a couple redundant sentences:
“Your application can send notifications on behalf of the user without requiring their interaction.”
and
“Notifications also do not require an explicit approval from the sending user.”

2008-08-07
26TYPO

Last sentence: “This can feel a little strange at first, but you’ll be happy to avoid the millions of page views you would get if your application develops a large following.”
How about: “This can feel a little strange at first, but you’ll be happy to avoid the millions of page views YOU’LL get if your application develops a large following.”

2008-08-07
27TYPO

End of 2nd paragraph: “its icon should show appear in the Applications menu”
How about removing the redundant “show”

2008-08-07
31TYPO

“We’ll need to allow our application to be added by Facebook Users.”
Don’t think “Users” should be capitalized.

2008-08-07
34TYPO

2nd-to-last line: “accidently” should be “accidentally”

2008-08-07
49ERROR

The skip button doesn’t work.(afaict anyway)
Just getting my head around the rest stuff.
But still, with the helper, i think i have to hack in a param to the request for action to be able to use the skip.
Given the annoyance of the skip not working (and just re-rendering the invitations page), it really should get a mention.

2008-08-07
115TYPO

publishing a user action isn’t working for me,
i have the error:

NoMethodError (You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.new):
/vendor/plugins/facebooker/lib/facebooker/parser.rb:425:in `process’
/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse’
/vendor/plugins/facebooker/lib/facebooker/service.rb:13:in `post’
/vendor/plugins/facebooker/lib/facebooker/session.rb:454:in `post’
/vendor/plugins/facebooker/lib/facebooker/session.rb:322:in `publish_user_action’
/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:281:in `send_message’
/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:374:in `method_missing’

2008-08-07
36SUGGEST

2nd paragraph: “If you don’t have git installed, you could download…”
How aboout: “…you CAN download…”

2008-08-07
36SUGGEST

4th paragraph: “Installing Facebooker will create a config/facebooker.yml”
How about: “Installing Facebooker will create config/facebooker.yml”

2008-08-07
36SUGGEST

Footnote on Git could also mention git-scm.com, a great new (and friendly) resource Scott Chacon recently put up. Sort of a redesign of git.or.cz

2008-08-07
37SUGGEST

First paragraph, last line: “…our canvas paths…”
How about: “…our canvas path…”

2008-08-07
37SUGGEST

2nd paragraph: “…directly from our servers.”
How about “…directly from our server.” (It’s used in singular in two other places in same paragraph)

2008-08-07
38SUGGEST

End of 2nd paragraph: “…without requiring a user to login.”
How about: “…without requiring a user to allow access.”

2008-08-07
38SUGGEST

3rd paragraph: “To require a user to login…”
How about: “To require a user to allow access…”

2008-08-07
38SUGGEST

End of 2nd-to-last paragraph: “…users who haven’t logged in to our application.”
How about: “…users who haven’t allowed access to our application.”

2008-08-07
38TYPO

Last paragraph: “attaacks” should be “attacks”

2008-08-07
38TYPO

Footnote url runs off end of page!

2008-08-07
39TYPO

Start of section 2.2: “Since we’re going to start by building an invitation system.”
Drop “Since”

2008-08-07
39TYPO

Last code sample: “invitatations” should be “invitations”

2008-08-07
39TYPO

Footnote 7 runs off end of page

2008-08-07
42SUGGEST

3rd paragraph: “You should see a message telling you that you have a new request. When you click on that request, you will be taken to a page where you can read the message. Our message is a little boring.”

How about: “You should see a message telling you that you have a new request. When you click on that MESSAGE, you will be taken to a page where you can read the REQUEST. Our REQUEST is a little boring.”

2008-08-07
43SUGGEST

2nd-to-last paragraph: “Rails is going to try to render create.erb, so let’s create that file here.”
Where’s “here”? How about dropping “here”, or else saying where the file is being created; something like “let’s create that file in our invitation views folder.”

2008-08-07
44TYPO

2nd paragraph: “…two special FBML tags here; and…”
No space between “here;” and “

2008-08-07
45TYPO

Last paragraph: “…a very nice interface to working with the Facebook API.”
How about: “…a very nice interface FOR working with the Facebook API.”

2008-08-07
48TYPO

2nd paragraph: “…use render_to_stringto get…”
Missing space

2008-08-07
52SUGGEST

2nd paragraph: “you’ll see a lot of concepts that will be used in other applications.”
How about: “you’ll see a lot of concepts that CAN be used in other applications.”

2008-08-07
52SUGGEST

2nd paragraph: “We’ll see how to access the Facebook session…”
How about: “We’ll see how to access Facebook sessions…”

2008-08-07
55TYPO

Top of page: “Our filter simple calls out for method…”
Should be: “Our filter simply calls our for method…”

2008-08-07
57TYPO

Top of page: “The Facebooker::Session object represents is used by Facebook…”
Drop “represents”

2008-08-07
57ERROR

Top of page: Actually… the Facebooker::Session object isn’t used by Facebook. Sessions are used by Facebook.

2008-08-07
57TYPO

End of 1st pargraph: “Facebook uses the session to prevent applications from taking action on behalf of a user who isn’t actively using their application.”

How about something like: “Facebook uses sessions to prevent applications from performing actions on behalf of users who aren’t actively using them.”

2008-08-07
58TYPO

Code sample at top: if…end indents don’t match

2008-08-07
58SUGGEST

2nd-to-last paragraph: “…secure_with! is used to bind a session object to a specific user.”
I’m not exactly sure what this means.

2008-08-07
61SUGGEST

When we’re creating associations on this page, I’m curious why we don’t associate Move and Attack. Is it because we won’t be accessing objects through that association?

2008-08-07
62SUGGEST

2nd paragraph: “We’re really cutting up now. I can’t help but feel like something is missing.”
How about something like: “We’re really cutting up now, but I can’t help feeling like something is missing.”

2008-08-07
65SUGGEST

2nd code sample: not sure why set_initial_belt method is indented like that…

2008-08-07
67SUGGEST

2nd code sample: I’m wondering, how does running User.find return ids for which we have never created a User object? Does passing the friends_facebook_ids parameter somehow add these ids to the pool of ‘findable’ Users in this call?

2008-08-07
69SUGGEST

“we’ll look at a typical example of the API.”
How about something like: “we’ll look at a typical example usage of the API.”

2008-08-07
69TYPO

“display that user’s hometown”
How about: “display a user’s hometown”

2008-08-07
69TYPO

“we need to understand how Facebook fetches data”
How about: “we need to understand how Facebooker fetches data”

2008-08-07
69SUGGEST

Bottom of page: “…it will automatically set Facebooker::Session.current to the viewer of the page.”

How about something like, “…it will automatically set Facebooker::Session.current to the session belonging to the user making the request.”

2008-08-07
72SUGGEST

“premature optimization” box: “You could put off this type of cleanup until the end of the application, but…”
How about something like: “You could put off this type of cleanup until the end of writing the application, but…”

2008-08-07
73SUGGEST

Example at top:
Could move the should_be_upgraded? call inside the “if a.hit?” right above. Why check if it isn’t a hit?

2008-08-07
73TYPO

Bottom: “We were able to quickly add indexes to tables that would be repeatedly accessed.”
How about: “We were able to quickly add indexes to tables that WILL be repeatedly accessed.”

2008-08-07
38TYPO

“to login” (occurs twice), should be “to log in”

2008-08-07
75TYPO

“Facebook specific helpers” should be “Facebooker specific helpers”

2008-08-20
76SUGGEST

Code sample starts with: “include Facebooker::Rails::TestHelpers”
It doesn’t look like this include is used at all in this sample, and it’s not mentioned until the text explaining the next sample.

2008-08-20
77TYPO

Toward bottom: “Let’s use the post method”
How about: “Let’s use the facebook_post method”

2008-08-20
78TYPO

2nd paragraph: “Not only will that make them run slowly, it also makes them less reliable.”
How about:
“Not only will that make them run slowly, it WILL ALSO MAKE them less reliable.”
or
“Not only DOES that make them run slowly, it also makes them less reliable.”

2008-08-20
79SUGGEST

Last paragraph: Wondering if, by default, a mocked method returns true?

2008-08-20
80TYPO

Middle paragraph: “instances of an class” should be “instances of a class”

2008-08-20
80TYPO

Start of bottom paragraph: “That lets use verify” should be “That lets US verify”

2008-08-20
81SUGGEST

Near top: “If our code either doesn’t call profile_fbml= or calls it more than once,”
Suggested addition: “or calls it with the wrong content, ”

2008-08-20
81TYPO

Near top: “raise and exception” should be “raise an exception”

2008-08-20
81SUGGEST

First paragraph of 4.2: Maybe a “however” somewhere in the last sentence?

2008-08-20
82SUGGEST

Middle of page: “This will require us to include FlexMock in that test too.”
Maybe drop “too”?

2008-08-20
83ERROR

Near end: “We’ve looked at testing our models and publishers as well.”
I don’t think we’ve looked at testing publishers yet. It looks like we get to that on page 141.

2008-08-20
86TYPO

Top of page: “That’s look” should be “Let’s look”

2008-08-20
86SUGGEST

I’m a little confused by some variations in the examples that use forms. Sometimes, like in this one, we have “Attack.new” without “:attack” and “:url=>create_attack_path” like on page 88…

2008-08-20
86SUGGEST

Middle of page: “…it will also look for a plain .erb file.”
Suggestion: drop “also”

2008-08-20
86TYPO

Last sentence: “…send user ids of selected users in ids parameter.”
How about “…send user ids of the selected users in the ids parameter.”

2008-08-20
88TYPO

Bottom line: should “flash(:error)” be “flash[:error]”?

2008-08-20
92SUGGEST

Seems like a bit of a contortion to use the index of a Battles controller for a user’s page (with a user_id parameter), rather than the get action of a Users controller. But maybe this is more a matter of taste?

2008-08-20
93ERROR

Looks like figure is showing the older version of Facebook

2008-08-20
95SUGGEST

Middle of page: “Now we’ll only have to make a change in one place to add a new tab.”

…and change the way we track which tab is selected!

2008-08-20
95TYPO

End of 4th paragraph: “Let’s add a link to about help page…”
How about: “Let’s add a link to our about page…”

2008-08-20
96ERROR

Screengrabs from old profile on pages 96 and 97

2008-08-20
97TYPO

End of 1st paragraph: duplicate “the”

2008-08-20
98SUGGEST

Things like “FunWall competes directly with an application that comes already installed.”
Seems harder now to compete with something like the redesigned wall…

2008-08-20
99SUGGEST

Don’t think figure 5.9 is mentioned in text

2008-08-20
100TYPO

Middle of page: “We could use the to limit…”
How about: “We could use the TAG to limit…”

2008-08-20
102TYPO

Top of first code sample: “page ||= 1” looks redundant, with the default value given in parens right above

2008-08-20
102TYPO

Middle of page: Two sentences back to back starting with “Now” looks a little repetitive.

2008-08-20
103TYPO

Top paragraph: “To get hem” should be “To get them”

2008-08-20
105SUGGEST

At 38 pages, this is a huge chapter. It looks like it could be split, maybe at the start of section 6.3. Before that are 18 pages just covering publishing notifications and feed items.

2008-08-20
105TYPO

Last line: “Notifications are a text only message that always starts…”
How about: “Notifications are text only messages that always start…”

2008-08-20
106TYPO

Last line: “…the notification body is limited to text only HTML and FBML tags.”
Seems like hyphenating “text only” would make it easier to read.

2008-08-20
107TYPO

“The first is a list of User ids”
Not sure if “User” should be capitalized…

2008-08-20
108SUGGEST

End of 3rd-to-last paragraph: “Our recipients can be an array of our User objects, a Facebooker::User, or even just a raw Facebook ID.”
I’m curious how the publisher can know what to do with objects from the User model we defined?

2008-08-20
109TYPO

In the 2nd paragraph, “from” has a code font once, and shows up without a code font twice.

2008-08-20
109SUGGEST

We can render a link asking a user to opt into extra app permissions (eg email) when is then hidden when that permission is granted. Curious if we can render a link for users to opt back out?

2008-08-20
112TYPO

5th paragraph: “When you view your sent notification”
How about: “When you view a sent notification”

2008-08-20
113SUGGEST

The word “feeds” is used several times on this page and the next few pages where I would think “feed items” or “feed stories” would be more correct. When a new element is added, is that element a “feed” or a item/story within a feed?

2008-08-20
114TYPO

2nd paragraph: “methods used for generating template” should be “methods used for generating templates”

2008-08-20
114TYPO

2nd-to-last paragraph: “Template IDs are stored in the facebook_templates table that was created automatically for us when we generated our first publisher.”

Wondering: Aren’t Template IDs stored in a table belonging to the Publisher model we’re using? And wasn’t the table called “attack_publisher”, not “facebook_templates”?

2008-08-20
114TYPO

Last paragraph: “It’s name” should be “Its name”

2008-08-20
115TYPO

2nd paragraph: “In the above example we only created a one line template. Let’s add a short story as well.”
How about “…Let’s add a short story TEMPLATE as well.”

2008-08-20
115TYPO

End of page: change “small stories” to “short stories”

2008-08-20
116TYPO

Top of page: “let’s us” should be “lets us”

2008-08-20
116TYPO

3rd paragraph: “your friends actions” should be “your friends’ actions”

2008-08-20
116TYPO

4th paragraph: “Let’s say you are friends with both my wife and I on Facebook.” Should “I” be “me”? (the “drop the other party” rule would seem to say so)

2008-08-20
116TYPO

Bottom of page: “our friends newsfeeds” should be “our friends’ newsfeeds”

2008-08-20
117TYPO

Top: “Let’s add another version of our stories that can more easily be aggregated.”
How about: “Let’s add versions of our story templates that can more easily be aggregated.”

2008-08-20
117SUGGEST

2nd paragraph: “Now we can re-register our templates and send a few feed items.”
I’m wondering: When we do this, does Facebook clear the templates we registered before? Or does each new template get a new ID, allowing us to reference any template we’ve ever created?

2008-08-20
117TYPO

3rd paragraph: “friends newsfeeds” should be “friends’ newsfeeds”

2008-08-20
117TYPO

Footnote 2: “…reflect thew new…” (thew=>the)

2008-08-20
118TYPO

Near top: “non-logged in user”
How about: “non-logged-in user”

2008-08-20
118TYPO

Near top: “attacl” should be “attack”

2008-08-20
118TYPO

End of 1st paragraph: “…encourages them to login to Karate Poke.”
How about: “…encourages them to allow access to Karate Poke.”

2008-08-20
118TYPO

2nd paragraph: “Our code works in the case.”
How about: “Our code works in this case.”

2008-08-20
118TYPO

2nd paragraph: “In this case” appears 3 times close together. Repetitive.

2008-08-20
118TYPO

End of 2nd paragraph: “install” and “installation”. Don’t think apps are “installed” anymore.

2008-08-20
118SUGGEST

Last paragraph: change “not logged in users” to “unauthenticated users”

2008-08-20
119SUGGEST

Last paragraph: “different enough where it makes sense”
How about: “different enough that it makes sense”

2008-08-20
120TYPO

3rd line: Space between end of sentence and superscript “3”

2008-08-20
120TYPO

2nd code sample: “do” syntax highlighted in “How do you want to…”

2008-08-20
120TYPO

2nd-to-last paragraph: add comma after quoted “Publish Content to Friend”

2008-08-20
120TYPO

2nd-to-last paragraph: “the profile of your friends”
How about: “the profiles of your friends”

2008-08-20
120TYPO

2nd-to-last paragraph: add comma after quoted “Publish Content to Self”

2008-08-20
121TYPO

End of last paragraph: “We can use the Facebooker render_publisher_response to send…”
How about: “We can use the Facebooker render_publisher_response METHOD to send…”

2008-08-20
122SUGGEST

Top: change “the same URL as they send” to “the same URL they send”

2008-08-20
122SUGGEST

2nd paragraph: “If we were to get an error…Facebook gives us…”
How about: “If we get an error…Facebook gives us…”

2008-08-20
122TYPO

End of 2nd paragraph: “simple enough where we”
How about: “simple enough that we”

2008-08-20
122SUGGEST

Last paragraph: “When a non-user of our application views the profile of one of our application users”
How about: “…our application’s users”

2008-08-20
123TYPO

Comment in 2nd example: “We can’t recover from this error, but we don’t want to show an error to our user as well”
Maybe drop “as well”?

2008-08-20
123TYPO

Last sentence of section 6.2: duplicate “by”

2008-08-20
123SUGGEST

Start of section 6.3: “We’ve looked at a lot of social features, but none of them have involved two people interacting.”

This doesn’t seem right - notifications and requests are often about two people interacting, aren’t they? And for our attacks, so are feed stories.

Should this be “multiple” instead of “two”?

2008-08-20
126TYPO

2nd of 2nd-to-last paragraph: “the users’s id” should be “the user’s id”

2008-08-20
127TYPO

Middle of page: “Adding the callbackurl url parameter”
How about: “Adding the callbackurl parameter”

2008-08-20
128SUGGEST

Don’t think figure 6.10 is mentioned in the text. Also, this and other pictures in this chapter are several pages away from the text that applies to them.

2008-08-20
128TYPO

Example at bottom: “and” is syntax highlighted when not used as code

2008-08-20
129TYPO

Footnote 5: “an retrieved later” should be “and retrieved later”

2008-08-20
130SUGGEST

Bottom: Wondering why we’re putting a partial underneath the “attack_publisher” directory rather than somewhere more general.

2008-08-20
131TYPO

Start of 2nd paragraph: “The only thing to be aware of is…”
How about: “The main thing to be aware of is…”

2008-08-20
134SUGGEST

Don’t think Figure 6.12 is mentioned in the text (think 132 would be the place)

2008-08-20
136SUGGEST

4th paragraph, 1st line: “your users’ profiles”
How about: “their profiles”

2008-08-20
136SUGGEST

4th paragraph: “An application tab is a cross between a normal canvas page and a profile page.”
How about: “…and a profile box.”

2008-08-20
136TYPO

End of 4th paragraph: “…as show in…” should be “…as shown in…”

2008-08-20
136SUGGEST

Near end: “Unfortunately, Facebook currently has a bug where these pages are requested with your canvas path prepended to it.”

Instead of “to it” how about “to the url” or “to their urls”?

Also, I’m not clear on why this is a bug. What should the behavior be, if not this?

2008-08-20
137SUGGEST

End of page: “but can’t send…”
How about: End of page: “but you can’t send…”

2008-08-20
138TYPO

Caption on figure 6.14 doesn’t have a period (seems like the other ones do)

2008-08-20
139TYPO

Near top: “Inside the facebook developer tool”
Capitalize “facebook”

2008-08-20
139TYPO

2nd example: ‘<div class=“battle”’ missing closing ‘>’

2008-08-20
140TYPO

Near top: “Our application main navigation just adds clutter.”
How about: “Our application’s main navigation bar just adds clutter.”
(2 suggested changes)

2008-08-20
140TYPO

Start of 3rd paragraph: “Now you can got to…”
How about: “Now you can go to…”

2008-08-20
140TYPO

Last paragraph: “a logged in user”
How about: “an authenticated user”

2008-08-20
141SUGGEST

Example at top
Wondering if (read-only) tab sessions are worth storing (separately from the ‘real’ sessions of course). This code doesn’t store it at all.

2008-08-20
141TYPO

Start of 1st paragraph: “It also wraps up…”
How about: “This also wraps up…”

2008-08-20
141SUGGEST

“Testing publishers” section
There seems to be some ambiguity here about whether we’re talking about Facebooker publishers (for notifications, emails, feeds, profile boxes and tabs…) or the Facebook Profile Publisher tool on the new Facebook profile.

2008-08-20
141SUGGEST

3rd paragraph: “…we used a publisher method for creating a notification without sending it.”
How about: “we SAW” (don’t think we’ve used it yet)

2008-08-20
142TYPO

Indentation looks wrong in the two code examples on this page.

2008-08-20
142SUGGEST

2nd paragraph: “Unfortunately, the returned notification object doesn’t include the recipient of the notification. To make sure our notification is sent to the right person, we’ll have to use a mock.”

Notifications are sent to a list of people right? So would this be more correct?
“Unfortunately, the returned notification object doesn’t include the recipient LIST of the notification. To make sure our notification is sent to the right PEOPLE, we’ll have to use a mock.”

2008-08-20
142TYPO

3rd paragraph: “…messages look like we expect it to.”
3rd paragraph: “…messages look like we expect THEM to.”

2008-08-20
142TYPO

“our user’s actions” should be “our users’ actions”

2008-08-20
142SUGGEST

Summary section doesn’t mention the profile publisher, tabs, or writing tests.

2008-08-20
146TYPO

2nd paragraph: ‘…with an “a” followed by…’
2nd paragraph: ‘…with an “a_” followed by…’

2008-08-20
146TYPO

4th paragraph: “We can modify our form to pass in listeners for both change and keyup events.”
How about: “We can modify our form by passing in listeners for both change and keyup events.”

2008-08-20
150TYPO

Top of text: non-code “for” colored by syntax highlighting

2008-08-20
151TYPO

End of sidebar: “make your comments use AJAX”
How about: “make your comments section use AJAX”

2008-08-20
153SUGGEST

End of 4th paragraph: “Since AJAX requests must go directly to our server, we’ll need to change our call a little. We’ll need to explicitly specify the URL to use in the form to include the :canvas=>false parameter.”

…but it looks like the sample in the “Mock AJAX” section uses the same :canvas=>false parameter. Is something supposed to be changing here?

2008-08-20
154SUGGEST

In example we see “var ajax=Ajax.new();”
In text below we see “var ajax=new Ajax();”

Are these two ways to do exactly the same thing?

2008-08-20
154SUGGEST

At bottom we’re talking about the ajax.post method.
Wondering: do all AJAX calls in Facebook canvas pages have to be POSTs?

2008-08-20
155SUGGEST

“Using JSON with AJAX” could be renamed to something like, “Using JSON and setInnerFBML with AJAX”

2008-08-20
155TYPO

2nd paragraph: “we can make use JSON…”
How about: "we can make use of JSON…

2008-08-20
155SUGGEST

Might the ‘request’ variable make a little more sense if it is named ‘response’ instead?

2008-08-20
155SUGGEST

Wondering why in this form we don’t see tags like text_area_tag start with a “f.” prefix for the form block parameter, but several others do.

2008-08-20
155TYPO

3rd paragraph: “convert response from FBML…”
How about: “convert responses from FBML…”

2008-08-20
155SUGGEST

3rd paragraph: “…from FBML to something that we can pass to setInnerFBML.”
Wondering what that “something” is. It’s non-intuitive that setInnerFBML apparently does not accept FBML!

2008-08-20
155SUGGEST

3rd paragraph: ’By convention, Facebook will treat any content in a variable whose name starts with “fbml” as an GBML document to be interpreted."

Is this specifically talking about something Facebook does with array keys in JSON that passes through Facebook’s servers when we’re using the Ajax.JSON response type? Or does this apply to any variable in our JavaScript named this way?

2008-08-20
151SUGGEST

After reading the whole AJAX section, I’m unclear on a few basic questions about how AJAX stuff happens in Facebook:

When do AJAX requests go through Facebook’s servers, and when do they go directly from the browser to our server? This seems to depend on whether we’re using Mock AJAX (in which case they go through Facebook’s servers) or their more complete AJAX implementation (in which case they go direct, unless you’re using a JSON return type, in which case they go through Facebook’s servers).

I’m not sure if I have this right or not.

2008-08-20
152SUGGEST

We use “request.xhr?” on this page. I’m wondering what determines the return value of xhr?
Is it the presence of the fb_sig_ajax parameter, mentioned on page 159?

2008-08-20
159TYPO

End of 3rd paragraph: “comes for the Facebook canvas”
How about: “comes from the Facebook canvas”

2008-08-20
163TYPO

2nd example: indentation looks wrong on 3rd line

2008-08-20
164SUGGEST

4th paragraph: “In IFrame , or inline frame, is an HTML component that embeds content from a URL into another page.”
How about: “…from a URL into an element within another page.”

2008-08-20
165TYPO

2nd line: duplicate “the”

2008-08-20
165TYPO

End of 1st paragraph: change “their session” to “that session”

2008-08-20
165TYPO

4th paragraph: “We don’t need to use and IFrame to share session information. By including session information in a link directly to our server we can also join the session.”

How about: “We don’t need to use AN IFrame to share session information, THOUGH. WE CAN ALSO JOIN THE SESSION by including session information in a link directly to our server.”
(3 changes)

2008-08-20
165TYPO

2nd-to-last paragraph: “have been established” should be “HAS been established”

2008-08-20
167TYPO

Start of 3rd paragraph: “Since the entire JavaScript API…”
What’s “entire” doing here?

2008-08-20
165TYPO

Curious what the “null” is that we’re passing to FB.ApiClient()

2008-08-20
168TYPO

Comment in example: “Get The name…”
How about: “Get the name…”

2008-08-20
169TYPO

Start of 3rd paragaph: “each each”

2008-08-20
169SUGGEST

Of course, this chapter now needs a section on Facebook Connect :)
I’m curious how it relates to the Facebook JavaScript API.

(I haven’t looked at the details of either much, and I’m wondering if they overlap, or if Facebook Connect makes the Facebook JavaScript API obsolete, or if they’re entirely different things…)

2008-08-20
172SUGGEST

Code sample in middle of page:

Wondering if the code:
returning true do
expire_cache(facebook_id)
end

…is somehow better than the more straightforward:
expire_cache(facebook_id)
return true

For example, is the first one “making sure” that we return true in a way that the second one isn’t? (say, if the call to expire_cache raises an exception)

2008-08-20
172TYPO

Last paragraph: “Unlike ActiveRecord, memcached can store more than just a single record at a time.”
Wondering if this is trying to say, “…more than just a single record IN MEMORY at a time.”?

2008-08-20
172TYPO

Indenting looks wrong in last example

2008-08-20
173TYPO

3rd paragraph: “Page caching is the slegehammer of Rails caching, it is…”

How about a ; or — instead

2008-08-20
173SUGGEST

Last paragraph: “Because Rails is bypassed”
Wondering if “Because most of Rails is bypassed” would be correct, or if it’s really saying that all of Rails is bypassed. If not Rails, then what is managing the caching?

2008-08-20
173SUGGEST

I’m wondering while reading this section: is it possible to have requests that are handled without ever hitting a disk? I don’t have a good mental picture of the beginning of the handling of a request. I assume the server is already loaded into memory, and that things that involve only memory (eg memcached) and no disks would be faster than involving things like spinning platters.

2008-08-20
175SUGGEST

Start of 2nd paragraph: “Because action cached requests still go through Rails”
Wondering if it would be more correct to say, “Because action cached requests still go through the Rails filters” or if it’s really correct that cached pages don’t touch Rails at all

2008-08-20
176SUGGEST

Last paragraph seems to be drawing a distinction between fragment caching an attack form vs a battle page. “The battle list is displayed the same way for everyone” doesn’t quite make sense to me, since everyone is going to have their own list of battles (so they can’t exactly share a fragment for that, right?)

2008-08-20
177TYPO

2nd paragraph, 2nd line: “Refs” capitalized (but in several other places, it isn’t)

2008-08-20
178TYPO

3rd paragraph, 4th line: “Refs” capitalized

2008-08-20
182TYPO

Crazy spacing in footnote 7

2008-08-20
184TYPO

Crazy spacing on footnote 8

2008-08-20
25TYPO

The page ends abrupty as follows. It looks as though the line has been truncated.

“When a user requests a page from Facebook, Facebook passes that”

2008-08-20
8TYPO

“In the early summer of 2007, when Facebook opened its doors to free registrations from the wild and untamed Internet”

Chad Fowler refers to the date of launch of the Facebook platform (for third-party Facebook app development) in early summer 2007.

However, the opening of registrations (to non-college students) occurred in Sept 2006.

2008-08-20
118TYPO

End of 1st paragraph: “…encourages them to login to Karate Poke.” => “…encourages them to log in to Karate Poke.”

2008-08-20
76SUGGEST

there is no mention of “:update_profile” anywhere before it is mentioned in this mock.

what’s that all about ?

2008-08-29
76ERROR

if you click on the page to copy-and-paste is opens a new browser window, and email window to try and send and email to “@controller <flexmock.should_receive>”!!

2008-08-29
1SUGGEST

It would be nice to have a section on how to contribute to Facebooker, perhaps (stretching it, I know) in a chapter with a roadmap to Facebooker’s internals.

I’ve submitted patches in rubyforge, but it seems to me like the patches feed isn’t actively managed (there are patches since January there). It would be nice to know what’s the accepted method of contributing.

Thanks!

2008-09-04
39TYPO

It looks like you added a line of markup to the top of the new.erb code example:

However, that tag is not mentioned or explained in the subsequent paragraphs. Instead, you say the first tag is .

2008-09-04
48SUGGEST

Suggest you show the final invitations/new.erb at the end of section 2.6, “Refactoring to Use Helpers”.

It’s not currently clear what should be replaced by the
call to fb_multi_friend_request. A comparison is made with the entire previous version of new.erb, implying the entirety should be replaced by the call. However, if this were done, I think we’ll lose the
fb:add-section-button for profile, which was in the previous version of new.erb.
The link to download the version from chapter 2 does not have the tidied code (i’m not sure if this is intentional).

2008-09-04
39TYPO

Setting up the invitation page, (/app/views/invitations/new.erb) I had to give it an fbml.erb extension instead of just .erb, and then I had to create a ‘new’ action in my controller to get it to work

127128TYPO

You use a method potential_disciples(friend_ids) on page 128, but you never mention defining it in any of the previous sections. it’s also inconsistent with the finished code you provide for chapter 6 because there, you use:

@not_potential_diciples = current_user.friends_with_senseis(friend_ids).map(&:facebook_id)

36SUGGEST

I found it was much easier to install facebooker by installing it from facebooker.rubyforge.org/svn/trunk/facebooker/. No need for git.

54TYPO

With Rails 2.1.2, the purpose of :limit has changed when specifying the length of an integer. Instead of doing :limit => 20, it should be :limit => 8 to specify a bigint type in MySQL.

38ERROR

The set_current_user method in app/controllers/application.rb needs to be updated to pass in a second facebook_session parameter otherwise the session_key value in the users table will always be null:

Before:
def set_current_user
self.current_user = User.for(facebook_session.user.to_i)
end

After:
def set_current_user
self.current_user = User.for(facebook_session.user.to_i, facebook_session)
end

This problem is not present in the downloadable code, just in the printed book.

86SUGGEST

This is concerning Footnote 6 on installing will_paginate.
According to errtheblog.com, installing will_paginate by running
script/plugin install svn://errtheblog.com/svn/plugins/will_paginate is “strongly discouraged” (installing this way didn’t actually work for me.
The recommended way is apparently script/plugin install git://github.com/mislav/will_paginate.git (installing this way worked for me; just had to make sure not to forget to restart the server).

91ERROR

The generate publisher command has apparently changed:

Before:
script/generate publisher attack

After:
script/generate facebook_publisher attack

114ERROR

Under the fb_request_form method, there is a fb_request_form_submit method.
This is not needed as the fb_multi_friend_selector method already provides a submit button as well as a skip button (the code in the book renders two submit buttons to screen). It would be needed if the friend selector was just a standard fb_friend_selector.

115SUGGEST

The line: “Since our partial is for AttackPublisher, I’ll put it in app/views/attack_publisher/_profile.erb” initially confused me since the app/views/attack_publisher/ folder is not generated automatically when script/generate facebook_publisher attack is initially run. I went looking for the controller that the views referred to, not remembering having ever created it.

May I suggest either including a note that app/views/attack_publisher/_profile.erb is a new file in a new folder, or better yet, have Facebooker generate the app/views/attack_publisher/ folder when a new facebook_publisher is generated.

27SUGGEST

In the new method of invitations_controller.rb, a variable is declared as from_user_id = facebook_session.user.to_s. This is then referenced in new_invitation_url method of fb:req-choice in the new.erb file. However, this is not reflected in the downloadable code for Chapter 2, so it seems that from_user_id is being declared for no reason.

Also, when invitations are revisited on page 113, the :from parameter referenced in the fb_req_choice method in the now new_attack_path method changed to @user.to_s, and then changes again further down the page to simply current_user without explanation.

I would like to suggest perhaps getting rid of the @from_user_id parameter altogether from page 27 and just reference current_user in the invitation views, so that no confusion results when invitations are revisited later on.

81SUGGEST

Refers to 1st paragraph, last sentence:

Once we have created the fb_dashboard with the fb_action and fb_help, since we have a Help and Feedback tab, we are then suggested to delete the help link and action. I can understand the help link deletion, but removing the action means that we don’t have any way to get to the invitation pages from the UI. So, I would like to suggest either perhaps a new tab for invitations or just keeping the invitations fb_action under the fb_dashboard.

113ERROR

I found that in the code for new.erb the new_attack_path method needs to be substituted for a new_attack_url method otherwise there will be routing errors when an invite is accepted.

44ERROR

148ERROR

The select nickname function in Karate Poke doesn’t work properly on Firefox.

Textbook code for app/views/attacks/index.fbml.erb

<%= render :partial=>“users/nickname”,
:locals=>{:closed => !current_user.nickname.blank?} %>


Textbook code for app/views/users/_nickname.erb


<% remote_form_for :user,
current_user,
:url => user_url(:id=> current_user, :canvas=> false),
:html => {:method => :put},
:update => “nickname” do |f| %>
Select a nickname to show outside of Facebook
<%= text_field_tag :nickname, current_user.nickname %>
<%= submit_tag “save” %>
<% end %>

When attacks/index is rendered to HTML, we get these two elements:

(from <%= text_field_tag :nickname, current_user.nickname %>)
I guess this is where Firefox gets tripped up: even though the elements are of a different type, they have the
same id.

So, I managed to get the page working as expected in Firefox by changing the name of the

id and the
:update value in the remote_form_for method. Either that, or change the name of the :nickname
symbol in _nickname.erb and app/controllers/users_controller.rb

87ERROR

In both code samples, shouldn’t we add attack.save before the create method ends? Otherwise, no attack is saved to the database (and the text explicitly mentions so). Either the code is wrong, or the description is wrong, and I think saving them makes sense (perhaps not in this case, but in general, make sense saving the models)

54ERROR

The method User#for calls #create_by_facebook_id . However, that method doesn’t exist. The method should call #find_or_create_by_facebook_id .

See “Dynamic attribute-based finders” at api.rubyonrails.org/classes/ActiveRecord/Base.html

54ERROR

The book should explicitly state that all before-filters that rely on Facebooker methods and variables must be defined after the call to #ensure_authenticated_to_facebook .

56TYPO

The Facebook Developer Terms of Service URL is now located at developers.facebook.com/terms.php .

56SUGGEST

Rather than say

“Facebook allows you to store only the IDs of events, networks, and users.”

I suggest something along the lines of

“Facebook allows developers to store the IDs of various objects, such as users, events, networks, etc. For a complete list, see the Facebook Developer Terms of Service[3].”

69ERROR

The #hometown method should check that the “location” variable isn’t blank/nil before calling “location.city” and “location.state”. See pastie.org/407507 .

88TYPO

On page 88, the options to #form_for are different from what was last discussed, on page 86.

94TYPO

The last two code samples call #fb_tab . However, the correct method name is #fb_tabs (IE: plural).

102TYPO

The “will_paginate” plugin is now hosted on GitHub at github.com/mislav/will_paginate/ .

30ERROR

The “Callback URL” is now part of the Canvas section of Edit Settings and is now called “Canvas Callback URL”.

31TYPO

screenshot is out of date.

31ERROR

Post-Add URL has been eliminated from facebook apps. I believe Post-Authorize Redirect URL replaced it.

58TYPO
  1. Re-create a Facbooker::Session
59ERROR

In the linked example code for application.rb:

self.current_user = User.for(facebook_session.user.to_i, facebook_session)

it shows “,facebook_session” but no where in the book does it show to add that. Therefore, when the book says, “we’ll need to visit our application in a web browser to set our session key” that won’t actually happen.

5336ERROR

The book suggests that a 64-bit integer is created with ActiveRecord by applying a :limit =>20 argument. This is incorrect. ActiveRecord uses the “limit” argument to describe the number of bytes for a binary or integer column. The correct limit value for triggering MySQL to set a given column as being BIGINT is 8. So the line from the book should read:

t.integer :facebook_id, :limit => 8, :null => false

39ERROR

You might want to mention deleting public/index.html so the map.root entry will take effect.

77ERROR

test_get_new_requires_user example needs “next” attached to login_url as discussed in the forums. Search on test_get_new_requires_user for solutions.

81ERROR

profile_expection has changed slightly. I had to cut and paste the error from the flexmock exception: “\
\\tI was sent here by \
\

98SUGGEST

FunWall has become FunSpace.

107ERROR

Generator has been renamed from publisher to facebook_publisher. Should read “script/generate facebook_publisher attack”.

31SUGGEST

I couldn’t get the samples to work until I checked “Render Method: FBML”. The screen shot does show this, but the text doesn’t mention making this change, and iFrame is the default value.

Categories: