Just a note to my future self, in case I ever need it again. All you need is the AS number.
$ whois -h whois.radb.net -- '-i origin AS1234' | grep 'route:'
For instance, all Facebook's IP addresses in use.
$ whois -h whois.radb.net -- '-i origin AS32934' | grep 'route:'
Or all their IPv6 ranges.
$ whois -h whois.radb.net -- '-i origin AS32934' | grep 'route6:'
Very useful if you want to write scripts that uses these IP ranges as filters.
Think of scripts to quickly ban all Facebook traffic (you know, in case the Facebook content scrapers are performing a DoS on your site), check Google IP ranges vs. the User-Agents used in your webserver access logs, ...