Hi. I have issues with fetching a patron details by patron’s id. Here is use case.
I’ve added Login with Patreon option to my webpage, and it works well. When someone login with Patreon successfully, I store his/her Patreon id and set remember token to login the member automatically when he/she visits my page next time. But before I let them see the all content, I want to check whether I received any payment. That’s why I need to get my patron details. To do that I tried:
• fetch_user() but it returns my account details instead of logged-in user.
• fetch_user() with the access token that returns from Patreon when someone login, but it returns unauthorized.
• fetch_member_details() but it doesn’t work with the id I passed, which is an integer.
• fetch_page_of_members_from_campaign() and fetch_member_details() but it takes ages to get data, which is unacceptable.
So, how can it be done?
Thanks in advance.
What library or software are you using? PHP lib?
To login I use Socialite from Laravel and Patreon API v1. To check at second visit I use patreon/patreon and API v2.
Mixing api v1 or v2 clients with api v1 and v2 could lead to problems.
Just try creating a v2 client, and only using v2 endpoints for these calls. (all of them).
I wish to be able to do that, but unfortunately, I couldn’t find any proper explanation in Patron documentation to create that functionality with v2. Even the code example in patreon/patreon-php uses v1. Additionally, Laravel SocialiteProviders doesn’t support v2.
Which particular functionality do you need from v1?
I don’t need anything from v1. I tried building a login system with v2 and failed. That’s why I used Laravel Socialite and Socialite Providers, which is based on v1. Now, I’m trying to build it again by using patreon-php and keep failing miserably, but I think I should create a new topic for my current issue.
Thanks.
What particular problem are you encountering with patreon-php?