开发者

req.getParameter(FacebookParam.SESSION_KEY.toString()) got null value

I try to developing facebook application using java. I used the follwing code String session=null; session=req.getParameter(FacebookP开发者_JAVA技巧aram.SESSION_KEY.toString()). But i didnt able to get session value . I got only null


Well for one thing, this would happen if the user did not have a Facebook session (i.e., was not logged in).

If you're sure they were, then there's some kind of bug in your code, and you'd need to show us the surrounding code in order to pick it out. (However, this seems quite unlikely; unless you're somehow passing in a different Request object, or messing up the null check, chances are that your check is correct and it's just down to the user not being logged in).


Some browser's have addons which can explicitly say "dont participate in sessions". In that case you may have to use the jsessionId as a cookie or a request param.

But mostly your app server should already do this for you. (Just google "jsessionID" for how to use this)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜