2011-07-11 22 views
1

我正在使用Facebook Graph API在当前登录用户的朋友墙/饲料上发表帖子。 我希望它能够在墙贴中显示三个动作链接。属性必须是字典! - Facebook图形API

这是因为这里记录下“出版”一节中的POST请求:https://graph.facebook.com/10000000006549/feed
但其捐赠: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请求到由我跟随错误:

{ 
    "error": { 
     "type": "OAuthException", 
     "message": "(#100) properties must be a dictionary" 
    } 

为什么我得到这个OA例外?我应该做些什么改变才能在墙贴上有3个动作链接?

请指引我....

回答

0

这可能是一个错误或Facebook的结束一个文档的问题。在他们的Graph API文档中,/ feed被列为仅接受消息,图片,链接,名称,标题,描述和源参数。然而,流属性文件中仍然提到了属性参数,这是其他参数详细记录的唯一地方。所以,最终,虽然我不知道什么是错的,但是看起来好像代码没有问题。 (我得到了同样的问题,无论哈希和数组我提供该财产的,其排列。)

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

相关问题