In general terms, absolutely use APIs whenever possible.
As the name implies, with "scraping" you are merely dealing with the "surface" of the application, in MVC terms its (HTML) views. Those views can change at any instant -- think how many times Twitter and other similar services undergo site redesigns. If you are scraping, then each site redesign, even a minor one, will very likely break your existing code, forcing you (without warning) to make frantic updates based on guesswork.
Nokogiri and Mechanize are powerful tools, but they will never compare with the functionality, stability and consistency of an API, which accesses database content directly, bypassing the ever-changing "surface" altogether. In the case of Twitter, you have the added benefit of API wrappers such as the Twitter gem for accessing the API, which add a user-friendly layer to the API making it yet easier to integrate into your application.
So to sum up: use the API, possibly via an API wrapper such as the Twitter gem.