cfhttp multipart& facebook
我正在玩facebook图表api,并试图将图像发送到我的墙上。据facebook说,你只需发送图像,你的访问密钥和&一个标题......见下面我的代码:
<cfoutput>
<cfif fileexists("D:myPathimagesmenubar.jpg")>
<cfhttp method="post" url="https://graph.facebook.com/me/photos" multipart="yes">
<cfhttpparam type="formfield" name="access_token" value="myAccessToken">
<cfhttpparam type="file" name="source" file="D:myPathimagesmenubar.jpg">
<cfhttpparam type="formfield" name="message" value="this is a test picture.">
</cfhttp>
<cfdump var="#cfhttp#">
</cfif>
</cfoutput>
当我运行这个时,我得到一个400错误请求错误(“OauthException发生未知错误”从facebook返回)。有谁知道我做错了什么?谢谢!
没有找到相关结果
已邀请:
2 个回复
粳饶瓢部
在上面提到的声明中,您必须按字面意思传递访问令牌。我在这里大胆一点。 =的access_token&somedata放大器;期满= sometimestamp 我一直在努力解决同样的问题,差不多3个小时。 :)终于做到了!
阀傻