回答編集履歴
3
「twitter.com/intent/tweet になったようなので」と書いておきながら、twitter.com/intent/tweet になってなかったので修正しました
answer
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
"tag3"
|
20
20
|
].join(",");
|
21
21
|
|
22
|
-
window.open("https://twitter.com/
|
22
|
+
window.open("https://twitter.com/intent/tweet?" + [
|
23
23
|
"text=" + encodeURIComponent(text),
|
24
24
|
"url=" + encodeURIComponent(url),
|
25
25
|
"hashtags=" + encodeURIComponent(hashtags)
|
2
window.openの使い方を修正しました
answer
CHANGED
@@ -19,9 +19,9 @@
|
|
19
19
|
"tag3"
|
20
20
|
].join(",");
|
21
21
|
|
22
|
-
window.open(
|
22
|
+
window.open("https://twitter.com/share?" + [
|
23
23
|
"text=" + encodeURIComponent(text),
|
24
24
|
"url=" + encodeURIComponent(url),
|
25
25
|
"hashtags=" + encodeURIComponent(hashtags)
|
26
|
-
].join("&");
|
26
|
+
].join("&"));
|
27
27
|
```
|
1
encodeURIComponentを追加しました
answer
CHANGED
@@ -20,8 +20,8 @@
|
|
20
20
|
].join(",");
|
21
21
|
|
22
22
|
window.open().location.href = "https://twitter.com/share?" + [
|
23
|
-
"text=" + text,
|
23
|
+
"text=" + encodeURIComponent(text),
|
24
|
-
"url=" + url,
|
24
|
+
"url=" + encodeURIComponent(url),
|
25
|
-
"hashtags=" + hashtags
|
25
|
+
"hashtags=" + encodeURIComponent(hashtags)
|
26
26
|
].join("&");
|
27
27
|
```
|