On the Facebook Graph API Post documentation the only way of posting images to a wall (user’s or page’s) is by providing the picture field on the request.
So I could use that and upload the image from my hard-disk to a server and use that url. Like this:
curl --form picture=http://userserve-ak.last.fm/serve/174s/66037848/Foals+png.png --form access_token=AAADChj --form message=msg1 https://graph.facebook.com/242001885843121/feed
But when I do that the type field of the post gets set as “status” and not as “photo”.
I tried some different things like using the same request parameters used for uploading an image to an album with no success:
curl --form picture=@/tmp/fb_gallery.png --form access_token=AAADChj --form message=msg2 https://graph.facebook.com/242001885843121/feed
curl --form source=@/tmp/fb_gallery.png --form access_token=AAADChj --form message=msg2 https://graph.facebook.com/242001885843121/feed
I tried to set the type field to “photo” with no luck also.
Try out with this one it can upload 2 photos at a time