I'm trying to run some automated functional tests using python and Twill. The tests verify that my application's OAuth login and connection endpoints work properly.
Luckily Twitter doesn't mind that Twill/Mechanize is accessing twitter.com. However, Facebook does not like the fact that I'm using Twill to access facebook.com. I get their 'Incompatible Browser' response. I simply want to access their OAuth dialog page and either allow or deny the application I'm testing. Is there a way to configure Twill/Mechanize so that Facebook will think its a standard browser?
Try to send user agent header w/ mechanize.