Error in posting

Showing 1-2 of 2 messages
Error in posting Rohit Choudhary 7/19/12 6:08 AM
Hi All,

I am trying to post a message with link and i followed the documentation. It was working fine till 18 July 2012, but today on 19 July 2012 when I run the same code it throws error
 
reason:upstream server error or internal server error (Can not deserialize instance of java.util.List out of START_OBJECT token at [Source: org.mortbay.jetty.HttpParser$Input@4313bd64; line: 1, column: 208])

Here is my json data which i am sending to the post link 'https://api.seesmic.com/1/posts.json'.

"{"destinations":
        [{"account":{"id":"52c6c2e8-49f0-46dd-9a40-277da0d926f8"}}
        ,{"account":{"id":"c4cf56aa-545a-4a26-9bfc-8eda077974ad"}}],
        "message":"This is a test message",
        "scheduled":"2012-07-24T08:15:29.254Z",
        "links":{"url":"http:\/\/www.sktnetwork.com"}
}"

Please suggest what to do here?


Re: [sessmicping-api] Error in posting George Ionita 7/19/12 11:12 PM
Hi Rohit,

Your JSON is missing the target bit for each account. This is from the docs:

{
    "destinations": [{
        "account": {
            "id": "51299541-d534-4c42-abdb-7febb78ad584",
            "target": {
                "id": "160152767394341"
            }
        }
    }, {
        "account": {
            "id": "29e90bb4-3e35-4d8c-a25e-f2f0896a5d0e",
            "target": {
                "id": "407169696"
            }
        }
    }],
    "message": "basic post 2 accounts",
    "scheduled": "2012-02-04T08:15:29.254Z"
}
As you can see, aside from the account/id, you also have to specify the target id. You can get the targets for each account from the /accounts.json call. We are using this structure to allow posting to services that support multiple posting destinations. For example, Facebook and Tumblr, after you log in with your personal account, allow you to post either as yourself or as a page (or secondary blog - for Tumblr).

George




--
You received this message because you are subscribed to the Google Groups "Seesmic Ping API Development Group" group.
To post to this group, send email to seesmic-ping-api-development-group@googlegroups.com.
To unsubscribe from this group, send email to seesmic-ping-api-development-group+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/seesmic-ping-api-development-group/-/99EOV14zU6AJ.
For more options, visit https://groups.google.com/groups/opt_out.