Ok, so I am using anonymous/anonymous while I don't have the 3-legged
support.
However, I would like to be able to retrieve photos, friends, albums,
profile activity and so on to try the API.
I am trying to run OrkutSample, but I always get
Exception in thread "main" java.lang.RuntimeException: Unexpected
exception while setting response
at
com.google.orkut.client.api.BatchTransaction.setResponse(BatchTransaction.java:169)
at com.google.orkut.client.sample.Transport.run(Transport.java:111)
at
com.google.orkut.client.sample.PhotosTxSample.fetchFirstAlbum(PhotosTxSample.java:112)
at
com.google.orkut.client.sample.PhotosTxSample.run(PhotosTxSample.java:55)
at com.google.orkut.client.sample.OrkutSample.run(OrkutSample.java:35)
at com.google.orkut.client.sample.OrkutSample.main(OrkutSample.java:54)
Caused by: org.json.me.JSONException: A JSONArray text must start with
'[' at character 0 of
at org.json.me.JSONTokener.syntaxError(JSONTokener.java:448)
at org.json.me.JSONArray.<init>(JSONArray.java:106)
at org.json.me.JSONArray.<init>(JSONArray.java:145)
at
com.google.orkut.client.api.BatchTransaction.setResponse(BatchTransaction.java:159)
... 5 more
It seems like this happens because in Transport.run(), the String
response comes empty.
Is this happening because I am using anonymous/anonymous?
Best regards,
Pedro
On 11-08-2010 02:58, devendra devendra wrote:
Well, I also did not find a document reading clearly that the java
library only supports 3 legged authentication but:
a) Initial announcement (
http://googlecode.blogspot.com/2010/05/announcing-orkut-java-client-library.html )
said: "Using three-legged OAuth, you can get friends’ profile data,
post and retrieve status and activity updates, read and write scraps,
create and retrieve photo albums, and upload pictures."
b) READEME with java library points to the link (
http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html#new
) to get consumer key and shared secret.
c) I also found that the consumer key/shared secret which I got by
registering my gadget app did not work with java library
Regards,
Devendra
2010/8/10 Pedro Gonçalves <[email protected]
<mailto:[email protected]>>
So in order to use the library, I must use the 3-legged
authentication, and must register a domain?
Cheers,
Pedro
On 10-08-2010 15:02, devendra devendra wrote:
Hi,
Others can correct me if I am wrong but I think, you cannot use
your gadget app consumer key and secure id for java client
library. If you want to just test the library, you can use
"anonymous" for consumer key and shared secret both. That
works. Or please get consumer key and shared secret by
registering your domain on
http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html#new.
Regards,
Devendra
On Tue, Aug 10, 2010 at 2:59 PM, pandre <[email protected]
<mailto:[email protected]>> wrote:
Hi,
I am trying to use the samples provided in java library
(orkut-os-
client).
I am running TestOrkutAuth, but I always get
Authentication FAILED
Exception in thread "main" net.oauth.OAuthException:
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Aug 2010 09:09:19 GMT
Expires: Tue, 10 Aug 2010 09:09:19 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 52
Server: GSE
Consumer is not registered: orkut.com:317487946397
<http://orkut.com:317487946397>
at
net.oauth.example.desktop.DesktopClient.login(DesktopClient.java:
201)
at
com.google.orkut.client.sample.Transport.init(Transport.java:92)
at
com.google.orkut.client.sample.TestOrkutAuth.run(TestOrkutAuth.java:
36)
at
com.google.orkut.client.sample.TestOrkutAuth.main(TestOrkutAuth.java:
62)
Caused by: net.oauth.OAuthProblemException: HTTP/1.1 400 Bad
Request
I've tried to use "317487946397", "orkut.com:317487946397
<http://orkut.com:317487946397>" and
"google.com:317487946397 <http://google.com:317487946397>" as
the application key, but I always get the
same answer.
I've created and validated a sample gadget (that's how I got the
consumer key and secret).
All I want is to get OAuth authentication data so that I can
start
using Orkut client library
--
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]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto: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]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:[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]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto: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.
--
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.