I wrote a really simple JavaScript script that uses jQuery to extract all the categories from Facebook's "Create a page" page.
- Navigate to the Create a page page.
- jQuerify the page.
- Open up your JavaScript console of choice and run the following script:
(function () {
var categories = {};
// Get the value/text of each category <option> on the page
$jq("select[name=category] option").each(function () {
categories[$jq(this).val()] = $jq(this).text();
});
// Delete the "Choose a category" default option
delete categories["0"];
// Print a JSON string of all the categories
return JSON.stringify(categories);
})();
lovely!