Having trouble with the instructions on https://github.com/Patreon/patreon-php. I created my Client and API keys … and am trying to now integrate the PHP code into my site… The code for their example starts with…
That is giving me an error because the instructions don’t tell me how to modify the path (so my server doesn’t know where to look for these files). I assume I need to replace the DIR with a different directory. I checked the PHP files that they provide (GitHub - Patreon/patreon-php: Interact with the Patreon API via OAuth, but there is no vendor/autoload.php in the files.
In addition, even if these files existed … I dont know where to upload any of these files on my server … the root level of my server, the root of my site…?
The only instructions that I see for “installing” the libraries are …
`composer require patreon/patreon`
View the source on [github](https://github.com/Patreon/patreon-php)
There’s no mention of installing without composer. (note: my programming knowledge is pretty limited, and I’m unfamiliar with installing PHP libraries. I’m not even sure I’d have access to composer on my shared host’s environment).
You should be able to use the library by directly including the necessary files after ftping them. However, that does require programming knowledge and you would need to get help if you dont know how to do it. Without it, you wouldnt be able to use a library anyway.
A better option for you would be to use a WordPress site and install the WordPress plugin. It wouldnt require any programming knowledge to install and maintain.
Yeah, there’s no conditionals for “logged in users” in there … There are a ton of variables … but the examples don’t specify which variable or what values constitute “logged in”.
And if I try and echo out these variables in a PHP file (to see what their contents are), almost all of them come up empty (and I know it’s linking to my patreon, because the link one of the examples shows points me onto my patreon page).
Yeah, there’s no conditionals for “logged in users” in there
Thats not correct.
This example demonstrates how to implement log in via Patreon. At the moment you have an access token, it means that the user has Patreon authorized. At this point you would need to log that user into your own website system in however way your system does it.
And the above example demonstrates how to check for member details that could be used to implement member-only features.
It may be easier for you to ask whomever developed your website for you to implement it or get someone with more experience in PHP to help.
So, by that logic, couldn’t you get the member details … such as, what membership tier they have (I’m not sure how to call that variable based on the example above) … and then do a simple conditional based on that?
I ran the user_details_and_patronage.php on my server… and echo’d out all the variables. Most of the variabales that the example document has come up empty (I dont see any mention of this issue in the documentation or the examples). I thought it would return all my information…
I decided to not use Patreon. Spent the last couple weeks trying to set this up, but I’m just not getting the support I need. Instead, I just setup my own member section and shop on my site, and decided to use PayPal to manage my subscriptions.