Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd11df03

Browse files
committed
initial version.
0 parents  commitd11df03

File tree

5 files changed

+1271
-0
lines changed

5 files changed

+1271
-0
lines changed

‎README

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
3+
var clientInfo = {
4+
name: 'Client Name'
5+
}
6+
var accessor = {
7+
consumerKey: 'registered consumerKey',
8+
consumerSecret: 'registered consumerSecret'
9+
};
10+
var client = new Twitter.Client(clientInfo, accessor);
11+
12+
client.addEventListener('unauthorized', function(e) {
13+
client.requestToken(function() {
14+
location.href = client.getAuthorizeURL();
15+
});
16+
});
17+
client.addEventListener('error', function(e) {
18+
//
19+
});
20+
21+
function verifyClient() {
22+
var pin = document.getElementById('PIN').value;
23+
client.verifyClient(pin, function() {
24+
widget.setPreferenceForKey(client.accessor.token, 'oauth_token');
25+
widget.setPreferenceForKey(client.accessor.tokenSecret, 'oauth_token_secret');
26+
});
27+
return false;
28+
}
29+
30+
function send() {
31+
var status = document.getElementById('STATUS').value;
32+
33+
var agent = client.createAgent('statuses/update');
34+
agent.params = {
35+
status: status
36+
};
37+
var req = agent.send();
38+
req.onload = function() {
39+
if (client.handleResponseCode(req, agent)) {
40+
//
41+
}
42+
};
43+
}
44+
45+
function verifyCredential() {
46+
client.verifyCredentials(function(xhr) {
47+
//
48+
});
49+
}
50+
51+
function timeline() {
52+
var agent = client.createAgent('statuses/friends_timeline');
53+
var req = agent.send();
54+
req.onload = function() {
55+
if (client.handleResponseCode(req, agent)) {
56+
//
57+
}
58+
};
59+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp