ianlee-dev / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

Incorrect signature using existing session in Desktop app #98

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Instantiate FaceBookRestClient with API_KEY and SECRET, setting it to
desktop
2.a. Create token using auth_createToken()
2.b. Direct user to login to my facebook app with token in parameter
2.c. Get session key using auth_getSession()
3. Instantiate a new FacebookRestClient with API_KEY, SECRET, and session
key, always setting it to desktop
4. Make a call to an API function with the new client
(users_getLoggedInUser(), users_setStatus()

What is the expected output? What do you see instead?
=> I expect to not get incorrect signature error at step 5.

What version of the product are you using? On what operating system?
api 1.8.0-final / jdk 1.5 / win xp

Please provide any additional information below.

Original issue reported on code.google.com by eric.p...@gmail.com on 2 Sep 2008 at 2:00

GoogleCodeExporter commented 8 years ago
Hi Eric,
you seem to have creating desktop application so am i. Sorry i have no solution 
in
response to your problem but a question! Got blocked using livemessage.Send() . 
It
doesnt seem to send message to the recipient but throws Error( Error code:0 and 
Error
message: Success ----wierd huh!).
I havent used any FBJS for the callback but just trying to send a message 
before i
attempt that. Have you any experience with this method?

Original comment by Shruthi....@gmail.com on 22 Oct 2008 at 3:54

GoogleCodeExporter commented 8 years ago
weird, I'll have to look at it.  I think there is a difference between the web
session key and the desktopSessionKey, the code might be getting confused.

Original comment by fern...@gmail.com on 23 Nov 2008 at 7:47

GoogleCodeExporter commented 8 years ago
just looking at the code, there is a cachedSessionSecret, and ignores the 
usualy app
"secret".

This makes sense, since you can't ship a desktop app with a secret, so I guess
facebook regenerates one for the user every time you call auth_getSession.

So you have to capture the cachedSessionSecret and put that into the new 
instance as
well. (2.0.x codebase that is).

Original comment by fern...@gmail.com on 23 Nov 2008 at 8:30

GoogleCodeExporter commented 8 years ago
Should be fixed on HEAD. Please take a look at my checkins along with
Issue99FriendsGetCachedPOJOTest.

Original comment by david.j....@googlemail.com on 22 Dec 2008 at 9:16