开发者

How to create FacebookSession manually when authenticating with FB.login JavaScript SDK

I am 开发者_JS百科currently using Facebook C# SDK most recent version with Facebook's JavaScript SDK framework. I am doing a combination of AJAX for a registration form. I can see that in the FacebookWebContext.Current there is a method for deleting the FacebookAuthCookie. The problem is when I login with FB.login function. I am not sure how to create a FacebookSession so that it works the way it should so that I can use FacebookWebContext.Current.IsAuthenticated to deteremine if they are logged in on the server side.

How can I go about this? I have looked all over the place and find no good examples of how to create the Facebook Session Cookie...

Any pointers? Thanks!

Ben


When you login using FB.login() and it is successful, it automatically generates your session. You can get it in the callback you specified in the FB.login, see here. It is the response.session object.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜