1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00

post feed

This commit is contained in:
nov 2014-05-21 14:26:27 +09:00
parent 05997b7624
commit 236fddfa50
3 changed files with 14 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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 = {})