mirror of
https://github.com/nov/fb_graph2
synced 2023-03-27 23:22:15 -04:00
post feed
This commit is contained in:
parent
05997b7624
commit
236fddfa50
3 changed files with 14 additions and 2 deletions
|
@ -46,8 +46,9 @@ module FbGraph2
|
||||||
end
|
end
|
||||||
when :user
|
when :user
|
||||||
User.new raw[:id], raw
|
User.new raw[:id], raw
|
||||||
when :custom
|
else
|
||||||
# NOTE: handle custom attributes in each class
|
# NOTE: handle these attributes in each class
|
||||||
|
next
|
||||||
end
|
end
|
||||||
self.send :"#{key}=", value
|
self.send :"#{key}=", value
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,6 +7,11 @@ module FbGraph2
|
||||||
Post.new(post[:id], post).authenticate self.access_token
|
Post.new(post[:id], post).authenticate self.access_token
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def feed!(params = {})
|
||||||
|
post = post params, edge: :feed
|
||||||
|
Post.new(post[:id], params.merge(post)).authenticate self.access_token
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -48,6 +48,12 @@ module FbGraph2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def post(params = {}, options = {})
|
||||||
|
handle_response do
|
||||||
|
http_client.post build_endpoint(options), build_params(params)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def edge_for(edge, params = {}, options = {})
|
def edge_for(edge, params = {}, options = {})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue