fb_graph 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +14 -0
- data/VERSION +1 -1
- data/fb_graph.gemspec +1 -1
- data/lib/fb_graph/connections/comments.rb +4 -0
- data/lib/fb_graph/node.rb +5 -2
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -146,6 +146,20 @@ Almost all connections for each object are also supported. (Private message co
|
|
146
146
|
:message => 'Hello, where is photo?'
|
147
147
|
)
|
148
148
|
|
149
|
+
==== Delete an object
|
150
|
+
|
151
|
+
post = FbGraph::Page.new(117513961602338).feed.first
|
152
|
+
bool = post.like!(
|
153
|
+
:access_token => ACCESS_TOKEN
|
154
|
+
)
|
155
|
+
comment = post.comment!(
|
156
|
+
:access_token => ACCESS_TOKEN,
|
157
|
+
:message => 'Hey, I\'m testing you!'
|
158
|
+
)
|
159
|
+
comment.destroy(:access_token => ACCESS_TOKEN)
|
160
|
+
post.unlike!(:access_token => ACCESS_TOKEN)
|
161
|
+
post.destroy(:access_token => ACCESS_TOKEN)
|
162
|
+
|
149
163
|
== Note on Patches/Pull Requests
|
150
164
|
|
151
165
|
* Fork the project.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/fb_graph.gemspec
CHANGED
data/lib/fb_graph/node.rb
CHANGED
@@ -22,7 +22,7 @@ module FbGraph
|
|
22
22
|
|
23
23
|
def destroy(options = {})
|
24
24
|
options[:access_token] ||= self.access_token if self.access_token
|
25
|
-
|
25
|
+
delete(options)
|
26
26
|
end
|
27
27
|
|
28
28
|
protected
|
@@ -44,7 +44,10 @@ module FbGraph
|
|
44
44
|
def delete(params = {})
|
45
45
|
_endpoint_ = build_endpoint(params.merge!(:method => :delete))
|
46
46
|
handle_response do
|
47
|
-
|
47
|
+
# NOTE:
|
48
|
+
# DELETE method didn't work for some reason.
|
49
|
+
# Use POST with "method=delete" for now.
|
50
|
+
RestClient.post(_endpoint_, params.merge!(:method => :delete))
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|