質問編集履歴
2
クライアントキーを隠しました!
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,9 +36,9 @@
|
|
36
36
|
|
37
37
|
@tw = Twitter::Client.new(
|
38
38
|
|
39
|
-
consumer_key: '
|
39
|
+
consumer_key: 'hogehogehogehoge',
|
40
40
|
|
41
|
-
consumer_secret: '
|
41
|
+
consumer_secret: 'hogehogehogehoge',
|
42
42
|
|
43
43
|
oauth_token: params[:access_token],
|
44
44
|
|
1
全角スペース問題のご指摘受けたので、直しました!!
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,11 +30,7 @@
|
|
30
30
|
|
31
31
|
require "twitter"
|
32
32
|
|
33
|
-
include Constants
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
def update
|
38
34
|
|
39
35
|
#Twiiterからとる
|
40
36
|
|
@@ -50,37 +46,37 @@
|
|
50
46
|
|
51
47
|
)
|
52
48
|
|
53
|
-
|
49
|
+
if current_user.update(provider: params[:provider], screen_name: @tw.user.screen_name, provider_user_id: @tw.user.id)
|
54
50
|
|
55
|
-
|
51
|
+
render json: current_user, adapter: :json
|
56
52
|
|
57
|
-
|
53
|
+
else
|
58
54
|
|
59
|
-
|
55
|
+
render json: { message: "error" }, status: :unprocessable_entity
|
60
56
|
|
61
|
-
|
57
|
+
end
|
62
58
|
|
63
59
|
end
|
64
60
|
|
65
61
|
|
66
62
|
|
67
|
-
|
63
|
+
def destroy
|
68
64
|
|
69
|
-
|
65
|
+
if current_user
|
70
66
|
|
71
|
-
|
67
|
+
current_user.screen_name.destroy
|
72
68
|
|
73
|
-
|
69
|
+
current_user.provider_user_id.destroy
|
74
70
|
|
75
|
-
|
71
|
+
render json: { message: "success" }, status: :unprocessable_entity
|
76
72
|
|
77
|
-
|
73
|
+
else
|
78
74
|
|
79
|
-
|
75
|
+
render json: { message: "error" }, status: :unprocessable_entity
|
80
76
|
|
81
|
-
|
77
|
+
end
|
82
78
|
|
83
|
-
|
79
|
+
end
|
84
80
|
|
85
81
|
end
|
86
82
|
|
@@ -96,9 +92,7 @@
|
|
96
92
|
|
97
93
|
```
|
98
94
|
|
99
|
-
uninitialized constant Api::V1::SnsconnectsContoller
|
95
|
+
uninitialized constant Api::V1::SnsconnectsContoller
|
100
|
-
|
101
|
-
```
|
102
96
|
|
103
97
|
というRouting Errorが出てしまいます、、
|
104
98
|
|