使用codeigniter框架下的oauth 2 build保护我的API

I need to build my own API and i need to secure my API Using Oauth 2 server i Have try many ways to integrate Oauth 2 for the codeigniter as library but its not working there is errors how to integrate oauth server with codeigniter to secure my API any library ? plugin ? helpers?

http://oauth.net/2/

I m trying to use this https://github.com/fkooman/php-oauth

How can i use those files inside Codeigniter

Instructions for integration are in this comment of this answer:

Integrate oauth 2.0 server with codeigniter