forked from superfeedr/subtome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevelopers.html
108 lines (94 loc) · 4.82 KB
/
developers.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SubToMe - Developers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="src/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="src/subtome.css" rel="stylesheet">
<script src="src/jquery/jquery.js"></script>
<script src="src/bootstrap/js/bootstrap.js"></script>
<script src="/build/settings.subtome.js"></script>
<style type="text/css">
body {
padding-top: 20px;
padding-bottom: 40px;
}
/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow > hr {
margin: 30px 0;
}
</style>
<link href="src/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="shortcut icon" href="src/ico/favicon.ico">
</head>
<body>
<script>
if(window.location.host == 'www.subtome.com' && window.location.protocol != 'https:') {
window.location = 'https://www.subtome.com' + window.location.pathname;
}
</script>
<div class="container-narrow">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><a href="/settings.html">Settings</a></li>
<li><a href="/publishers.html">Add a button to your site</a></li>
<li class="active" ><a href="/developers.html">Apps</a></li>
</ul>
<h3 class="muted"><a href="/">SubToMe</a></h3>
</div>
<hr>
<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 <a href="/publishers.html">publisher</a> 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:
<script src="https://gist.github.com/4333876.js"></script>
Please note that this is completely transparent for the user!
</p>
<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 susbcription (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>
<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</code> (see previous section). Based on the <code>url</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>
<hr>
<div class="footer">
<p>Brought to you by <a href="http://superfeedr.com">Superfeedr</a> <img src="https://www.gravatar.com/avatar/a2f7d4dd6df7dd59e4adab811c00a3a1?s=24" style="vertical-align:middle;">.</p>
</div>
</div> <!-- /container -->
<script src="src/jquery/jquery.js"></script>
<script src="src/bootstrap/js/bootstrap.js"></script>
<a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
</body>
</html>