Checking whether a user is logged into Flattr?

2019-09-17 03:36发布

问题:

Is there a way to test whether a user is logged into Flattr?

The idea is to set up a "I'm-ready-to-donate-wall" that only Flattr users are allowed to pass. However, unlike a paywall, the user is not forced to click a flattr button; I just want to make sure that he's ready to flattr anything if he/she likes what he/she sees. I am not interested in his/her account credentials either.

Obviously, this is a thinly veiled scheme to get users to sign up to Flattr. I don't know whether this is a good or bad idea, but it might be worth a shot.

回答1:

"The idea is to set up a "I'm-ready-to-donate-wall" that only Flattr users are allowed to pass."

Beware that, if I remember correctly, it was not accepted in the Flattr code of conduct. Maybe it has changed lately (I cannot find the reference of this) but check first with some Flattr people if you can legally do that.



回答2:

You can use "login" to your site with the Flattr OAUTH 2 API.

So what you would do is to connect your site as an third part application to flattr and then let the users authenticate with their Flattr login http://developers.flattr.net/v2/#authorization

The first time the users access use your site they have to allow your app access to their Flattr profile.

Moreover, you can authorize a user without gaining access to any non-public features. To get any special access you need to specify the scopes for which you want special access - specify no scopes and the only thing you get to know is that a specific user has a specific account on Flattr.com.



标签: flattr