Support me on Patreon button

Is there such a thing? Like a like button, maybe showing the number of patrons? I had a brief look around but could not find something like that.

1 Like

I don’t believe anything like this exists currently. You could easily create a script that generates one for yourself server-side though. I think you’re out of luck for a purely client-side implementation, for now.

Great question. Okay so there’s a few answers:

  1. Every creator has a widget they can embed found here https://www.patreon.com/dashboard/widgets

  1. We do have a way to make it easy for a third party developer to generate those on behalf of creators given their public ‘vanity’ url. It’s admittedly poorly documented, and I’m happy to share that here if it’s helpful

  2. Nothing so far on # patrons, goals, etc. We love the idea of it - and decided that we’d be better off focusing our team on the REST API and Webhooks for the time being.

@wackazong curious and interested to hear more about your context and use case

Oh? What’s this? Share! Share!

Here goes, first time this is being revealed publicly :slight_smile: drumroll…

And if this is interesting enough we can include in the docs.

How to create widgets on behalf of creators

  1. Your app’s UI asks its users for their patreon URL

  2. Your app code calls GET https://api.patreon.com/platform/users?filter[patreon_url]=${their patreon url} Note that only the GET value changes for each user, the GET key is static

  3. Patreon returns JSON containing the user id:

    data: {
        type: 'user',
        id: {their user id},
        ...
    },
    ...
}
  1. Your app should probably save the returned Patreon user id in your users database since it will not change

  2. When rendering the widget for a given individual creator, put this HTML snippet in their page:

<a href="https://www.patreon.com/bePatron?u={their user id}" data-patreon-widget-type="become-patron-button">Become a Patron!</a><script async src="https://cdn6.patreon.com/becomePatronButton.bundle.js"></script>

cc @david who built this a few months ago

Also cc @codebard I know this may be interesting to some of the work you’ve mentioned in the past

2 Likes

Ooo, awesome! I definitely have a use for this. :slight_smile:

And please tell me that the filter[] query will show up in more places. It’s so beautiful… :heart_eyes:

1 Like

Thanks, I took a note of this.

I made current version of my Patron Pro plugin get creator id automatically to use in widgets and urls. I may look into adding it to my widgets plugin in future if anyone uses it without Pro version.

1 Like

Thanks for all the great answers! I was looking for the widget, that is what I need. @tal, I built a small gate application for every free link that I give out. It fetches some metadata from the link it points to (like a soundcloud track) and presents the user with a page where they can (not must) support me in some way, FB like, soundcloud follow, etc. There I would also like to place the widget.

Thanks again!

1 Like

this is probably an old post , but as i am going through this , for some reason i am getting empty results object
{
“data”: []
}

this is how i make the request
axios.get(‘https://api.patreon.com/platform/users?filter[patreon_url]=${https://www.patreon.com/theralphreport}’).then((res)=>{
console.log(res.data);
})

am i missing something here ?

if i need to inject my token or client_key please give me an example of how do i do that.

${their patreon url} 

This is the token that should be replaced completely, i.e, it becomes:

https://www.patreon.com/theralphreport

Therefore, the complete code is…

axios.get('https://api.patreon.com/platform/users?filter[patreon_url]=https://www.patreon.com/theralphreport').then((res)=>{
    console.log(res.data);
})

Hello, I am a young but very ambitious karting pilot. Just Because it is a very expensive sport, i am looking for people who can contribute me to my dreams of becoming a champion. My all posts are currently in Lithuanian, but if you are in the process of joining, the recordings will become English.

What is the difference between a button that is generated from https://www.patreon.com/dashboard/widgets with a custom button that links to the checkout page?

They are technically the same widget, however the widget from the Button and Widgets Plugin can put your visitors directly into pledge flow (to become a member) at Patreon if you have Patron Plugin Pro (a premium addon). That helps increase conversion.

1 Like