-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdevelopers.html
More file actions
executable file
·36 lines (28 loc) · 2.68 KB
/
developers.html
File metadata and controls
executable file
·36 lines (28 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
layout: base
---
<div class="article-cover">
<div>
<img src="/images/developers.png" class="image">
</div>
</div>
<article class="container">
<h1>Applications</h1>
<h2>Allow your users to subscribe to content</h2>
<p>If your application is able to handle user subscriptions, this section is for you.</p>
<h3>Registration</h3>
<p>Your users will click on subscribe buttons on some pages. When they do so, a list of the subscription services <em>they</em> used in the past is displayed. This list was not curated by us, but stored in their browser (using localStorage) from services that registered their ability to perform susbcriptions for that user.</p>
<p>You too can quickly and easily register your application for your users by loading an iframe like this: <small>Please note that this is completely transparent for the user!</small></p>
<script src="https://gist.github.com/julien51/4333876.js"></script>
<p>The <code>name</code> query string is the name of your application and the <code>url</code> is the url of the hander which will be called in your application to perform a subscription (thru a user redirect). </p>
<p>The subscription handler is obviously completely up to you, but it should include at least one of the following:</p>
<ul>
<li><code>{url}</code> will be populated with the <code>location.href</code> of the page on which the user clicked the subscribe button.</li>
<li><code>{feeds}</code> will be populated with the <code>href</code> element of each <code><link></code> elements corresponding to a feed in the page on which the user clicked.</li>
<li><code>{feed}</code> will be populated with the first (if any) of the <code>{feeds}</code> above.</li>
</ul>
<p> It is also possible to register the user by opening a url in the browser directly. This is particularly useful for standalone (desktop based) feed readers. Use the url <code>https://www.subtome.com/#/register?</code>, with the same params used by the iframe based registration.</p>
<h3>Subscription handling</h3>
<p>When a user clicks on a SubToMe button, he can pick his favorite subscription application. If it's yours, then, a new browser tab will be created and will point to your application's handler <code>url, feed or feeds</code> (see previous section). Based on the <code>handler</code> you've provided, you will be able to extract the location of the page on which the button was clicked and its feeds.</p>
<p>Your application should then, perform the subscription, by extracting the content it needs. We recommend using the RSS/Atom feeds, but you could also very well extract the links to a Twitter profile for example allow the user to follow that profile. Possibilities are endless.</p>
</article>