Post multipart/form with image to facebook

monobrau's picture

Hi all!

I'm stuck with using networktools to post an image to a Facebook album.

Right now I've tried adjusting the composition from http://kineme.net/forum/DevelopingCompositions/FacecomwNetworkTools as a base to post multipart/form data.

The error I get returned is:

(#324) Requires upload file

324 OAuthException

However with a curl call (with the same credentials etc.)

curl -F 'access_token=' -F 'message=Check out my photo' -F 'source=@test.jpg' https://graph.facebook.com/album_id/photos

posts without any problems.

I'm wondering if anyone has experience with this or got some input on what I'm doing wrong?

I've attached the composition and also a trace from a successful curl post.

Facebook Graph API and Quartz Composer

incubo's picture

This might be (and actually is) old information, but I think that it's better to publish this anyways. I managed to figure this out today.

Here is a simple example of how to get information from Facebook to Quartz Composer. This composition gets the names and profile pictures of your (or anyone else's for that matter) friends. For me it seems, that it doesn't get all of my FB friends to QC, but 717 out of 742 friends came just fine. It might be that this is because of the rather complex privacy policies in FB.

You will need your Facebook id and an access token to get it working. You will get both of these by logging in to FB and going to Facebook Graph API Explorer (http://developers.facebook.com/tools/explorer). The Explorer is a great way to find out what kind of information you can get from FB. The access token you get from the FB Graph API Explorer expires quite quickly, but I think that there is some way to get a long time access token. Not sure how just yet.

For me https://developers.facebook.com/docs/getting-started/graphapi/ seems a good way to start tinkering with Facebook.

The composition uses DataTools, NetworkTools and FileTools from Kineme as well as JSON to Structure from smokers (http://kineme.net/composition/smokris/JSONStructure).

So, shall we re-visualize social media then?

kineme.net | Facebook

leegrosbauer's picture

I was sort of hoping someone with greater quartz composer qualifications than myself might post this, but it's been a few days and nothing has appeared yet so I'm taking the liberty to post a happy announcement:

Kineme.net now has an official Page at Facebook: http://www.facebook.com/pages/kinemenet/187835192871

I realize that not all of us use Facebook, but many of us do. Regardless, I feel certain that we all would agree that the wonderful folks and delightful resources here at kineme.net have enriched us all. I would therefore urge any current Facebook users in these forums to take the time to make a quick visit to the official kineme.net Page at Facebook. Kineme has been truly generous with us, in my honest opinion. What better thing than to make a small public nod over at Facebook to show our appreciation.

Best wishes to all.