Curl 属性必须是字典!!-Facebook图形API

Curl 属性必须是字典!!-Facebook图形API,curl,facebook-graph-api,facebook-oauth,Curl,Facebook Graph Api,Facebook Oauth,我正在使用Facebook Graph API在当前登录的用户朋友的wall/feed上发布帖子。 我想让它在墙上的柱子上显示三个动作链接 这是一个POST请求,记录在“发布”部分:http://developers.facebook.com/docs/reference/api/ 我已将CURLOPT_POSTFIELDS设置如下 ( [access_token] => 161318CRR8l0EBFXGhd-00.131037840000000862225914|R5i30nm

我正在使用Facebook Graph API在当前登录的用户朋友的wall/feed上发布帖子。 我想让它在墙上的柱子上显示三个动作链接

这是一个POST请求,记录在“发布”部分:
http://developers.facebook.com/docs/reference/api/

我已将CURLOPT_POSTFIELDS设置如下

(
    [access_token] => 161318CRR8l0EBFXGhd-00.131037840000000862225914|R5i30nmZr6yKICbHayaDzZ02f_Y
    [message] => This is a test message.
    [picture] => http://www.mydoain.com/mylogo.jpg
    [link] => http://www.mydoain.com/check.php
    [actions] => {name:"View Demo",link:"http://www.mydomain.com/demo",name:"View Features",link:"http://www.mydomain.com/features"}
    [name] => Click to Visit
    [caption] => 
    [properties] =>  properties: [
                {
                  name: "Demo",
                  text: "View Demo",
                  href: "http://www.mydomain.com/demo",
                },
                {
                  name: "Features",
                  text: "View Features",
                  href: "http://www.mydomain.com/features",
                },
            ]
    [description] => 
    [source] => 
)
并将POST请求发送至:
https://graph.facebook.com/10000000006549/feed

但它给了我以下错误:

{
   "error": {
      "type": "OAuthException",
      "message": "(#100) properties must be a dictionary"
   }
为什么我会得到这个OAuth异常?我应该做什么改变才能在墙贴上有3个动作链接


请告诉我……

这可能是Facebook端的错误或文档问题。在他们的Graph API文档中,/feed被列为只接受消息、图片、链接、名称、标题、描述和源参数。不过,在stream attachments文档中仍然提到了properties参数,这是唯一详细记录其他参数的地方。所以,最终,虽然我不知道出了什么问题,但您的代码似乎没有问题。(无论我为该属性提供了哪种散列和数组排列,我都会遇到同样的问题。)

http://developers.facebook.com/docs/guides/attachments/