session expired

405 views
Skip to first unread message

freak182

unread,
Oct 23, 2011, 4:32:14 AM10/23/11
to RestFB
Hi,

I am getting this error after several request from fb:

Oct 23, 2011 4:29:54 PM com.restfb.DefaultFacebookClient
makeRequestAndProcessResponse
INFO: Facebook responded with HTTP status code 400 and response body:
{"error":{"message":"Error validating access token: Session has
expired at unix time 1319292000. The current unix time is
1319358594.","type":"OAuthException"}}
Exception in thread "main"
com.restfb.exception.FacebookOAuthException: Received Facebook error
response of type OAuthException: Error validating access token:
Session has expired at unix time 1319292000. The current unix time is
1319358594.
at com.restfb.DefaultFacebookClient
$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookClient.java:
643)
at
com.restfb.DefaultFacebookClient.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookClient.java:
564)

and also

I try to get the "me/feed" i'm not getting results.. any idea how to
fix this?

thanks.
cheers.

Marcel Stör

unread,
Oct 23, 2011, 5:05:33 AM10/23/11
to res...@googlegroups.com
You need a token that allows offline access I guess:
http://groups.google.com/group/restfb/browse_thread/thread/013639df58a465fd

Cheers,
Marcel


--
Marcel Stör, http://www.frightanic.com
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

freak182

unread,
Oct 23, 2011, 5:30:59 AM10/23/11
to RestFB
Hi thanks,
I modify the connection like this:

String accessTokenFeed =
"AAAAAAITEghMBAESU8tbrrgjPasFgChmiYqxIvZAc3NWaZCsKIX3vvml6Nc02a5nuYwOWfAG9JcZABvqjSfPKwOoM5xyU7CbrgEbEEaF3eRPVk0eTOM8";
FacebookClient fb = new DefaultFacebookClient();
fb.convertSessionKeysToAccessTokens("appID", "app_secret", new
String[]{accessTokenFeed});

i get this following error:

INFO: Facebook responded with HTTP status code 400 and response body:
{"error":{"message":"An active access token must be used to query
information about the current user.","type":"OAuthException"}}
Exception in thread "main"
com.restfb.exception.FacebookOAuthException: Received Facebook error
response of type OAuthException: An active access token must be used
to query information about the current user.
at com.restfb.DefaultFacebookClient
$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookClient.java:
643)

i am accessing feed.

thanks.
cheers.

On 23 Okt, 17:05, Marcel Stör <mar...@frightanic.com> wrote:
> You need a token that allows offline access I guess:http://groups.google.com/group/restfb/browse_thread/thread/013639df58...
> Marcel Stör,http://www.frightanic.com

freak182

unread,
Oct 23, 2011, 8:12:40 AM10/23/11
to RestFB
thanks for the help.already figure it out.

freak182

unread,
Oct 25, 2011, 11:36:43 PM10/25/11
to RestFB
enable offline-access,read_stream
Reply all
Reply to author
Forward
0 new messages