问题标签 [flattr]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
113 浏览

api - 可发现 URL 的 Flattr API 调用

你知道如何为可发现的 URL 进行 API 调用吗?我可以做类似的事情:

没有任何额外的数据,如 user_id 等?

0 投票
1 回答
205 浏览

api - 检查用户上个月是否有 flattr 的最佳方法是什么?

我有一个小的数据库 fu*k-up,现在我必须检查用户是否在上个月奉承了某些东西,而不是把这些东西加倍。使用 API 的最佳方法是什么?有什么比简单地获取经过身份验证的用户 flattrs 的列表,然后检查给定的东西是否在该列表中更优雅的方法吗?

谢谢 :)

0 投票
2 回答
177 浏览

flattr - 将 Flattr 按钮集成到软件中

是否允许将 Flattr 按钮直接集成到软件中,例如在信用部分?

0 投票
4 回答
181 浏览

javascript - Python:获取 flattr 计数

我得到一个这样的列表(数字是评论的数量)......

...通过...

扁平计数

我有 77,但是如何在 python 中获得 4 ......?我认为 4 是在 javascript 中生成的,我认为它很难在 python 中处理 javascript,但在这种情况下它可能很容易?!

0 投票
1 回答
103 浏览

flattr - API 查找找不到东西 - 我使用的是正确的 URL 吗?

我目前正在为流行的开源 RSS 阅读器(微小的 RSS)开发 Flattr 插件。

我是第一次使用查找 API,但不确定为什么会得到不同的结果。所以我不确定我是否正确使用了 API,如果我遇到了一些基本错误,我想与各位专家确认一下。

首先,让我们看看我是否可以想出一个成功查找事物的 API 调用。我查看了 1066706 的 Flattr 页面(我不能在这里发布整个 URL,因为 SO 只允许我为整个帖子提供两个 URL)。在该页面上,我找到了 Flattr 为该内容存储的官方 URL,并使用 API 进行查找:请参阅此处

这会返回{"type":"thing","resource":"https:\/\/api.flattr.com\/rest\/v2\/things\/1066706", ...,这很好。

但似乎这种方法不是测试事物是否存在的可靠方法。这是一个不起作用的示例:我打开事物 e7579b349cb7b319b28d883cd4064e1e 的 Flattr 页面。

我在该页面上找到的那个 URL 确实是那篇文章的 URL,我看不到它可能有任何其他 URL。我以与上面相同的方式查找它:检查这个

唉,我明白了 {"message":"not_found","description":"No thing was found"}

(我也用编码的 URL 尝试了这两种方法,但得到了相同的结果。我认为这对你来说更容易阅读。)

那么,为什么找不到第二件事呢?感谢您的任何启发。

0 投票
1 回答
127 浏览

flattr - 查看捐赠给特定事物的金额

假设您想使用 Flattr 拥有一个类似 kickstarter 的网站,您可以在其中为每个单独的用户创建一个事物。你怎么能告诉(使用 API)每个用户 Flattr'd 多少?它不会立即更新(它必须在每个月的第一天更新),但有可能吗?如果没有办法做到这一点,你能说出一个特定的 Flattr 对你总共有多少吗?

0 投票
1 回答
95 浏览

tumblr - Flattr 按钮使用 Tumblr 主题代码显示错误

自几天前以来,我的博客上也与此问题类似, Flatr 在所有按钮上都显示错误。怎么了?有什么改变了 API 吗?我没有更改任何代码,但是当我看到博客或任何帖子时,会显示一个大的“错误”而不是 Flattr 按钮。有没有办法得到错误的原因?

在这里你可以看到我用来生成 Flattr 按钮的代码。在头部上方,您可以看到我包含的他们的 JavaScript。我的代码有错误吗?因为代码工作了一段时间。

0 投票
1 回答
32 浏览

wordpress - flattr 插件对点击没有响应

我的新 flattr 按钮没有响应,我可能做错了什么:

这带有这些 flattr 设置

uid:aprekates 类别:文本语言:en

我肯定会得到一个按钮图像,但网站没有回应!

谢谢

0 投票
1 回答
26 浏览

api - Flattr api 何时发生 invalid_request 错误?

我不清楚何时invalid_request发生错误。如果要授权的令牌不再有效,是否也会发生这种情况?

谢谢,乌多

0 投票
1 回答
404 浏览

oauth-2.0 - What is the recommended way to authorize a Flattr desktop application using OAuth2?

I'm building a plugin for an RSS desktop client which allows users to directly flattr things (i.e. blog posts) from within the client. Since it's a Java application I use flattr4j, which itself works fine so far.

My only remaining problem centers around the authorization workflow, which uses OAuth 2.0. Since flattr uses the authorization workflow described in section 4.1 of the OAuth 2.0 spec, I need to adhere to the prerequisites mentioned there, i.e.

The authorization code grant type is used to obtain both access tokens and refresh tokens and is optimized for confidential clients. As a redirection-based flow, the client must be capable of interacting with the resource owner's user-agent (typically a web browser) and capable of receiving incoming requests (via redirection) from the authorization server.

I managed to implement this workflow by

  1. embedding a web browser control into my application (I could problably use the user's real web browser as well)

  2. running a tiny local HTTP server which gets hit by the web browser via the OAuth callback URL mechanism in order to receive the OAuth code

Especially the last point looks error-prone to me. Since I need to register the callback URLs in advance (e.g. in my case http://localhost:port/whatever), I'm forced the speculate about a safe, non-used local port in order run a local HTTP server which receives the OAuth code at the end of the authorization workflow.

On the other side the flattr4j documentation mentions a different workflow, which looks more appealing to me for my use case:

"Client" based applications cannot offer a callback URL. Desktop or mobile device applications, for example, do not run a web server at all. For client based applications, Flattr will show a validation code on the website. The user will be required to enter the code in your application, in order to complete the authentication process.

And some lines further down:

When the user accepts, a validation code is generated by Flattr. If the application was registered as "Browser" typed, the callback URL you stated will be invoked with the code and the state as parameters. For "Client" applications, the code is presented to the user instead, and he is asked to enter the code in your application manually.

This workflow might not be perfect, but much more robust for a desktop application in my opinion.

(As for the application registration: I registered my application with the platform Desktop (Any). The platform seems to be more fine-grained compared to the above mentioned "Browser" vs. "Client" alternatives.)

So my questions are:

  1. Is a callback-less OAuth workflow still supported by Flattr? (Was it ever supported?)
  2. If so: how can I initiate this workflow?
  3. If not: are my concerns valid, or is the "open web browser, initiate authorization process and receive OAuth code via locally running HTTP server" just the way to go? Are there any alternatives that I overlooked?

UPDATE There is another option which I'm investigating now: I set up an "OAuth landing page" which is used as the callback URL. This website's only purpose is to display the OAuth code, which then can be copied to the Desktop application by the user. Not perfect, but looks more robust to me at the moment...