The usual approach would be to create an XPCOM component (note: the examples are outdated, you have to consider this as well) implementing nsIContentPolicy interface and register it in the content-policy category. The component's shouldLoad() method will be called for each load attempt - you can look at aContentLocation and aRequestOrigin parameters to decide whether you want to block the requests.
Same is possible with Adblock Plus filters of course, e.g. to block Facebook on mydomain.com you use this filter:
||facebook.com^$domain=mydomain.com
Adblock Plus allows other extensions to communicate with it. To add a bunch of filters your extension would do the following on startup:
var filters = [
"||facebook.com^$domain=mydomain.com",
"||twitter.com^$domain=mydomain.com"
];
AdblockPlus.updateExternalSubscription("FooExtension",
"Filters from Foo Extension",
filters);