I'm trying to post an image to an album via the Facebook Graph API with following ColdFusion-Code:
<cfhttp method="post" url="https://graph.facebook.com/#albumid#/photos/">
<cfhttpparam type="formfield" name="access_token" value="#access_token#" />
<cfhttpparam type="file" name="source" file="#img_dir#\dummy.jpg" />
<cfhttpparam type="formfield" name="message" value="foo bar" />
<cfhttpparam type="formfield" name="no_story" value="true" />
</cfhttp>
If I omit no_story=true, the whole thing works perfectly, however I need this attribute to prevent the post from appearing on my wall. I'm getting this error:
{"error":{"message":"(#100) Param no_story must be a boolean","type":"OAuthException","code":100}}
HTTP/1.1 400 Bad Request Content-Type: text/javascript; charset=UTF-8 WWW-Authenticate: OAuth "Facebook Platform" "invalid_request" "(#100) Param no_story must be a boolean" Access-Control-Allow-Origin: * X-FB-Rev: 1568945 Pragma: no-cache Cache-Control: no-store Facebook-API-Version: v2.2 Expires: Sat, 01 Jan 2000 00:00:00 GMT X-FB-Debug: Vt7Viz/nlNfsQDDfNKtVuBjfgjDiWPFxYb0TAEpJJa9NjrR+TrEB8nuMOerQJYMX9E2e1CeqfBZT70/1KODErg== Date: Wed, 21 Jan 2015 12:13:31 GMT Connection: close Content-Length: 98
I have tried following variations:
<cfhttpparam type="formfield" name="no_story" value="TRUE" />
<cfhttpparam type="formfield" name="no_story" value="True" />
<cfhttpparam type="formfield" name="no_story" value="#true#" />
<cfhttpparam type="formfield" name="no_story" value="#JavaCast('boolean', true)#" />
<cfhttpparam type="formfield" name="no_story" value="1" />
<cfhttpparam type="formfield" name="no_story" value="Yes" />
None of these worked.