We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is P1.0,
released over 4 years ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
|
27 |
#36236: 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. --Paul Fioravanti #36236: 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 ...more...
|
P1.0
01-Dec-08
|
|
| 30 |
|
#38991: The "Callback URL" is now part of the Canvas section of Edit Settings and is now called "Canvas Callback URL".--Justin Countiss
|
P1.0
24-Apr-09
|
|
| 31 |
|
#38992: screenshot is out of date.--Justin Countiss
|
P1.0
24-Apr-09
|
|
| 31 |
|
#38993: Post-Add URL has been eliminated from facebook apps. I believe Post-Authorize Redirect URL replaced it.--Justin Countiss
|
P1.0
24-Apr-09
|
|
| 31 |
|
#42485: 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.--Bob Sturim #42485: 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 ...more...
|
P1.0
21-Mar-10
|
|
| 36 |
|
#36014: I found it was much easier to install facebooker by installing it from facebooker.rubyforge.org/svn/trunk/facebooker/. No need for git.
--dzengal.com
|
P1.0
20-Nov-08
|
|
|
38 |
#36148: 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.--Paul Fioravanti #36148: The set_current_user method in app/controllers/application.rb needs to be updated to pass in a second facebook_session parameter otherwise the ...more...
|
P1.0
26-Nov-08
|
|
| 39 |
|
#34506: 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--Brad Tayan #34506: 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 t ...more...
|
B8.0
15-Sep-08
|
|
| 39 |
|
#41940: You might want to mention deleting public/index.html so the map.root entry will take effect.--Bill Gathen
|
P1.0
29-Dec-09
|
|
| 44 |
|
#36252: <fb:profile-pic uid="<%id%>" /> should be <fb:profile-pic uid"<%user%>" />--Joseph Rork
|
P1.0
02-Dec-08
|
|
| 53 |
36 |
#40954: 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--Trevor Rosen #40954: The book suggests that a 64-bit integer is created with ActiveRecord by applying a :limit =>20 argument. This is incorrect. ActiveRecord use ...more...
|
P1.0
07-Oct-09
|
|
| 54 |
|
#38161: 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--Nick Hoffman #38161: 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 . ...more...
|
P1.0
04-Mar-09
|
|
| 54 |
|
#38164: 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 .
--Nick Hoffman #38164: The book should explicitly state that all before-filters that rely on Facebooker methods and variables must be defined after the call to #ensu ...more...
|
P1.0
04-Mar-09
|
|
| 54 |
|
#36021: 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.--Aaron Valade #36021: 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 :li ...more...
|
P1.0
20-Nov-08
|
|
| 56 |
|
#38165: The Facebook Developer Terms of Service URL is now located at developers.facebook.com/terms.php .
--Nick Hoffman
|
P1.0
04-Mar-09
|
|
| 56 |
|
#38166: 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]."
--Nick Hoffman #38166: Rather than say
"Facebook allows you to store only the IDs of events, networks, and users."
I suggest something along the lines of
"F ...more...
|
P1.0
04-Mar-09
|
|
| 58 |
|
#39858: # Re-create a Facbooker::Session--Eric Tarn
|
P1.0
07-Jul-09
|
|
| 59 |
|
#39999: 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.--Peter T Bosse II #39999: In the linked example code for application.rb:
self.current_user = User.for(facebook_session.user.to_i, facebook_session)
it shows ",fac ...more...
|
P1.0
15-Jul-09
|
|
| 69 |
|
#38171: The #hometown method should check that the "location" variable isn't blank/nil before calling "location.city" and "location.state". See pastie.org/407507 .
--Nick Hoffman #38171: The #hometown method should check that the "location" variable isn't blank/nil before calling "location.city" and "location.state". See pastie ...more...
|
P1.0
04-Mar-09
|
|
| 77 |
|
#42088: 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.--Bill Gathen
|
P1.0
16-Jan-10
|
|
| 81 |
|
#42089: profile_expection has changed slightly. I had to cut and paste the error from the flexmock exception: "<fb:fbml>\n\tI was sent here by <fb:name uid='1' />\n</fb:fbml>\n"--Bill Gathen #42089: profile_expection has changed slightly. I had to cut and paste the error from the flexmock exception: "<fb:fbml>\n\tI was sent here by <fb:nam ...more...
|
P1.0
16-Jan-10
|
|
|
81 |
#36237: 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. --Paul Fioravanti #36237: 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 Feed ...more...
|
P1.0
01-Dec-08
|
|
|
86 |
#36149: 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).--Paul Fioravanti #36149: This is concerning Footnote 6 on installing will_paginate.
According to errtheblog.com, installing will_paginate by running
script/plugin in ...more...
|
P1.0
26-Nov-08
|
|
| 87 |
|
#37202: 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)--victor jalencas #37202: 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 ...more...
|
P1.0
22-Jan-09
|
|
| 88 |
|
#38199: On page 88, the options to #form_for are different from what was last discussed, on page 86.--Nick Hoffman
|
P1.0
05-Mar-09
|
|
|
91 |
#36150: The generate publisher command has apparently changed:
Before:
script/generate publisher attack
After:
script/generate facebook_publisher attack--Paul Fioravanti #36150: The generate publisher command has apparently changed:
Before:
script/generate publisher attack
After:
script/generate facebook_publis ...more...
|
P1.0
26-Nov-08
|
|
| 94 |
|
#38201: The last two code samples call #fb_tab . However, the correct method name is #fb_tabs (IE: plural).
--Nick Hoffman
|
P1.0
05-Mar-09
|
|
| 98 |
|
#42097: FunWall has become FunSpace.--Bill Gathen
|
P1.0
18-Jan-10
|
|
| 102 |
|
#38213: The "will_paginate" plugin is now hosted on GitHub at github.com/mislav/will_paginate/ .
--Nick Hoffman
|
P1.0
06-Mar-09
|
|
| 107 |
|
#42102: Generator has been renamed from publisher to facebook_publisher. Should read "script/generate facebook_publisher attack".
|
P1.0
19-Jan-10
|
|
|
113 |
#36238: 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.--Paul Fioravanti #36238: 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 ro ...more...
|
P1.0
01-Dec-08
|
|
|
114 |
#36159: 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.--Paul Fioravanti #36159: 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 ...more...
|
P1.0
28-Nov-08
|
|
|
115 |
#36209: 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.--Paul Fioravanti #36209: The line: "Since our partial is for AttackPublisher, I'll put it in app/views/attack_publisher/_profile.erb" initially confused me since the a ...more...
|
P1.0
01-Dec-08
|
|
| 127 |
128 |
#35202: 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)--Chris Ye #35202: 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 inc ...more...
|
B8.0
13-Oct-08
|
|
|
148 |
#36311: The select nickname function in Karate Poke doesn't work properly on Firefox.
Textbook code for app/views/attacks/index.fbml.erb
...
<div id="nickname">
<%= render :partial=>"users/nickname",
:locals=>{:closed => !current_user.nickname.blank?} %>
</div>
...
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:
<div id="[facebook_app_id]_nickname">
<input id="[facebook_app_id]_nickname"> (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 <div> 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--Paul Fioravanti #36311: The select nickname function in Karate Poke doesn't work properly on Firefox.
Textbook code for app/views/attacks/index.fbml.erb
...
<div ...more...
|
P1.0
05-Dec-08
|
|
| 1998 |
UreHQ |
#49575: I guess chorpulish kudirmanga and lukochuri are named after games children play in bengal.. all of us have played these games and are household terms in bangla..Also Borphi is the name of an evil sorcerer in Gupi Gyne Bagha Byne film.Pushdev Rabin of Oudh is also a masculine take on Phulan Devi.Bali kidnapping Maya and climbing higest tower in Kol direct reference to King Kong..Also there is a jab at the IIMs while discussing Kol's academics.The name Kol and certain of its characteristics reflect Kolkata(Calcutta)A Pashan(stone monster) named Khudito -inspired from famous novel by Tagore Khudito Pashan.--IFNDKowAQNuVp #49575: I guess chorpulish kudirmanga and lukochuri are named after games children play in bengal.. all of us have played these games and are ho ...more...
|
P1.0
26-Jul-12
|
|