Download the PHP package codebard/patreon-php without Composer
On this page you can find all versions of the php package codebard/patreon-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codebard/patreon-php
More information about codebard/patreon-php
Files in codebard/patreon-php
Package patreon-php
Short Description Interact with the Patreon API via OAuth
License MIT
Informations about the package patreon-php
patreon-php
Interact with the Patreon API via OAuth.
Important notice about updating to 1.0.0 from earlier versions
Patreon PHP library version 1.0.0 moves on to Patreon's v2 API, which is not compatible with old v1 calls. It also removes Art4 JSON library. Therefore directly upgrading from older versions to 1.0.0 would break compatibility of your installation. APIv1 will deprecated some time soon after APIv2 come out of beta, so its important to get your integration compatible with API v2. With API v2, you can only get access to the scopes you requested during authorization, and you need to ask for the data you want through includes.
If you were using Art4 library before, you can separately install it and feed the return from API calls to Art4 library after getting it as JSON from this library. This will make your existing code that uses Art4 library compatible. However note that you will need to track Art4 library updates and resulting compatibility issues yourself.
https://docs.patreon.com/#apiv2-oauth
If you have any questions or issues, please visit our developer forum at https://www.patreondevelopers.com/
NOTE: This library is made to be compatible with the maximum possible variety of different infrastructures, PHP versions and environments in order to cover a majority of potential integrations. If you would like to use more specialized versions of this lib with different amenities and additions/dependencies to better suit your environment, below is a list. If you would like your fork added to this list, please contact us at the forums.
soatok's fork with PHP 7.x, PHPunit, Psalm, BLAKE2b instead of MD5
Installation
Currently the repo at packagist is at 0.3.x and API v1 only, whereas the one at Github is at 1.0.0 and API v2 due to compatibility reasons for older installations which were done via composer. Until we sync the packagist version with the Github version, please use this repo by cloning it from Github, or downloading and uploading it to your environment via file transfer.
Usage
Step 1. Get your client_id and client_secret
Visit the Patreon platform documentation page while logged in as a Patreon creator to register your client.
This will provide you with a client_id
and a client_secret
.
Step 2. Use this plugin in your code
Let's say you wanted to make a "Log In with Patreon" button.
You've read through the directions, and are trying to implement "Step 2: Handling the OAuth Redirect" with your server.
The user will be arriving at one of your pages after you have sent them to [the authorize page] (www.patreon.com/oauth2/authorize) for step 1, so in their query parameters landing on this page, they will have a parameter 'code'
.
(If you are doing something other than the "Log In with Patreon" flow, please see the examples folder for more examples)
(Especially the unified flow is a great way to have users unlock locked features or content at your site or app - it allows users to register, login, pledge and return to your app in one smooth unified flow. Check it out in the examples folder )