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
|
||||
when :user
|
||||
User.new raw[:id], raw
|
||||
when :custom
|
||||
# NOTE: handle custom attributes in each class
|
||||
else
|
||||
# NOTE: handle these attributes in each class
|
||||
next
|
||||
end
|
||||
self.send :"#{key}=", value
|
||||
end
|
||||
|
|
|
@ -7,6 +7,11 @@ module FbGraph2
|
|||
Post.new(post[:id], post).authenticate self.access_token
|
||||
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
|
|
@ -48,6 +48,12 @@ module FbGraph2
|
|||
end
|
||||
end
|
||||
|
||||
def post(params = {}, options = {})
|
||||
handle_response do
|
||||
http_client.post build_endpoint(options), build_params(params)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def edge_for(edge, params = {}, options = {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue