Last year, NationBuilder released their API to the world, allowing applications to interact with Nations. You can find NationBuilder's API documentation here. This blog post will discuss how to create objects through the API.
The first step is understanding how the API and OAuth2 work. When working with OAuth2, the first request your client makes is to obtain an authorization token. Using that token, you can then make other requests through your application. It's important to note this two step process, as other APIs which use requests such as a RESTful or XML-RPC are generally one step processes.
The first step is to simply include the PHP-OAuth2 library.