but libraries_get_path doesn't exist in D8, and I'm not exactly sure how things change, not that we use namespaces (of which I am a beginner). And, where should I place my library? Should I create a new libraries directory and put it in the root, just like modules and themes are now in the root?

Ok, I was able to use libraries_get_path and it returned the correct path. But when I tried to require it, I got this error: Fatal error: Class 'Drupal\twitter_pull\Plugin\Block\TwitterAPIExchange'. My code is: require(libraries_get_path('twitter-api-php') . '/' . 'TwitterAPIExchange.php'); Whats wrong?
–
user1015214Sep 5 '14 at 13:17

As clive said, libraries_get_path is not a function that is shipped with Drupal core. Just for your information as of the change log #2169605, any libraries that you need to add to a page is by following,

If you use the libraries module and you put your library files in /libraries/library (which is where mine end up using drush make) you can simply call library_load('library') and that will do the require_once for you.