Hi Allan,
Yes, I managed to make it work. Note that if you send a message and use
image, or any url, it will issue a captcha.
You must retrieve the captcha using oauth, and the method is GET. Example:
When you send a message, it will issue a captcha:
[{"id":"teste","error":{"message":"unauthorized: Please enter the text as it
is shown in the
box.","data":{"errorType":"requiresCaptcha","captchaUrl":"/social/pages/captcha?xid=1279397910268","captchaToken":"token1279397910268"},"code":401}}]
After that, you will need to call http://www.orkut.com/{{captchaUrl}} using
oauth. A simple example:
http://www.orkut.com/social/pages/captcha?xid=1279397910268&oauth_nonce=13bdb4e05b6d349256d618189977be03&oauth_version=1.0&oauth_timestamp=1279397909&oauth_consumer_key=www.dxs.com.br&oauth_token=1%2F7RDAd4VmDYt7zBxiQlCS4jfH6jexVyAJiarGTv_dEJc&oauth_body_hash=XCGF2XpzvjJHiCCnQpdNu5y8294%3D&oauth_signature_method=HMAC-SHA1&oauth_signature=kMv3QFeYr4R8oJiybCoDGyn3x2M%3D
The user will answer the captcha, and you will need to send another rpc
command, containing the captcha text (entered by the user) and captchaToken,
returned from the server. Will look like this:
[{"method":"captcha.answer","params":{"userId":["@me"],"groupId":"@self","captchaAnswer":"answer",
"captchaToken":"token1279397910268"},"id":"token"}]
Let me know if you have any doubt.
--Robson Dantas
2010/7/19 Allann Jones <[email protected]>
> Hi. I think that is not possible at the moment to write scraps, right?
> Is somebody creating scraps successfully actually? How?
>
> I've tried many modes to try to write scraps without success.
>
> When trying to send (create) a message, on the response is informed
> that authentication through captcha image is required, but I only get
> NOT FOUND errors when trying to access it through GET method, and when
> trying through POST method on the response is informed that POST
> method is not supported.
>
> I've implemented on JavaScript many of the visualization functions and
> profile information update, but for me is not possible to create
> messages (send scraps) that is a basic function on Orkut - maybe the
> main functionality for many people.
>
> I am using OAuth 3-legged authentication on each request.
>
>
> Thank you. Best.
>
>
>
> On Mon, Jul 19, 2010 at 10:54 AM, Robson Dantas <[email protected]>
> wrote:
> > You can do that using 3-legged API. There is an official Orkut lib (java)
> > and another version I'm finishing, which uses PHP.
> > Java:
> > http://code.google.com/p/orkut-os-client/
> > PHP:
> > http://code.google.com/p/orkut-os-client-php/
> > Regards,
> > Robson Dantas
>
>
> --
> Allann Jones
>
> "I received the fundamentals of my education in school, but that was
> not enough. My real education, the superstructure, the details, the
> true architecture, I got out of the public library. For an
> impoverished child whose family could not afford to buy books, the
> library was the open door to wonder and achievement, and I can never
> be sufficiently grateful that I had the wit to charge through that
> door and make the most of it." (from I. Asimov, 1994)
>
> --
> You received this message because you are subscribed to the Google Groups
> "orkut Developer Forum" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<opensocial-orkut%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/opensocial-orkut?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"orkut Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/opensocial-orkut?hl=en.