in reply to Mechanize and Facebook App

I don't know why mechanize does not access final loaded page. it took some time to load the permission page but mechanize always returns first source page. How i can tell mechanize to wait till it loads all the pages?

Judging from your vague description it sounds like Facebook uses Javascript to load some pages. WWW::Mechanize doesn't interpret any javascript, so that's why.

Note that Facebook also has APIs to do stuff, which are prefered over screen scraping. See facebook for example.