我正在尝试让facebook 清洁器工作,但是它失败并显示以下消息:
./lib/facebook.rb:140:in `get_home': undefined method `email=' for nil:NilClass (NoMethodError)
from (eval):23:in `form_with'
from ./lib/facebook.rb:139:in `get_home'
from /var/lib/gems/1.8/gems/mechanize-2.5.1/lib/mechanize.rb:409:in `get'
from ./lib/facebook.rb:137:in `get_home'
from ./lib/facebook.rb:38:in `setup'
from fb_cleaner.rb:34
这是第 136 行到第 145 行的代码;
def get_home
@a.get(MOBILE_URL) do |page|
sleep(SLEEP_TIME)
@home = page.form_with(:action => "https://login.facebook.com/login.php?m=m") do |f|
f.email = @email
f.pass = @password
end.submit
end
@home
end # get_home
有人知道吗?