posting a photo from the server

10 views
Skip to first unread message

adam klein

unread,
Sep 11, 2011, 4:25:47 AM9/11/11
to rest-graph
Hi,

I need to upload a photo that is stored on the server, to a user's
album
According to facebook I need to POST to /[album ID]/photos, with
parameters:
- source (multipart/form-data)
- message (string)

Does anyone know how to do it with RestGraph?

thanks

Lin Jen-Shin (godfat)

unread,
Sep 12, 2011, 5:29:01 AM9/12/11
to rest-...@googlegroups.com
Hi Adam,

Here's what we are doing:

rg = RestGraph.new(:access_token => '...')
rg.post('me/photos',
:message => 'The Message',
:source => File.open('path/to/the/image'))

Hope this would help, and please let me know
if you have any other questions.

Cheers,

Reply all
Reply to author
Forward
0 new messages