开发者

properties must be a dictionary!! - Facebook Graph API

I am using Facebook Graph API to make a post on currently logged in user's friend's wall/feed. And i want it to show three action links there in the wall post.

This is a POST request as documented here under "Publishing" section : http://developers.facebook.com/docs/reference/api/

i have set CURLOPT_POSTFIELDS as following

(
    [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] => 
)

And the POST request is made to : https://gra开发者_StackOverflow社区ph.facebook.com/10000000006549/feed

But its giving me following error :

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

Why am i getting this OAuth Exception? What changes should i make to have to have 3 action links in wall post?

Please guide me....


This may be either an error or a documentation problem on Facebook's end. In their Graph API documentation, /feed is listed as accepting only the message, picture, link, name, caption, description, and source parameters. The properties parameter is still mentioned in the stream attachments document, though, which is the only place where the other parameters are documented in detail. So, ultimately, while I don't know what's wrong, it doesn't seem like there's a problem with your code. (I'm getting the same issue no matter which permutation of hashes and arrays I provide for that property.)

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜