1

I'm using the Facebook c# sdk on a new project and i've a question. In the follow code:

var app = new FacebookApp();
app.AppId = "myappid";
app.AppSecret = "theappsecretcode";
if (app.Session != null)
{
dynamic me = app.Get("me");
}

When i'm calling the method Get of FacebookApp, i'm i just accessing to the Cookie saved when i've authenticated with Facebook or i'm connecting to the Facebook and getting the values?

I'm asking because i'm saving the values of the user in a session when i authenticate with the Facebook, but if the method Get doesn't access to Facebook and just to the cookie, then i'll stop using the session and start to access to the Facebook cookie instead (i haven't understand yet if the cookie save some information about the user, but i've searched in "Watch" window in VS and i haven't found anything)

Thanks

Gui
  • 9,555
  • 10
  • 42
  • 54
  • I'm not following you here, but the you have a valid *session* not just a cookie when you login! – ifaour Jan 19 '11 at 00:22
  • 1
    I was asking if the method Get() of FacebokApp gets the information of ("me") from the cookie created or if he connects to facebook plataform – Gui Jan 19 '11 at 18:19

1 Answers1

3

I've examined source code of FacebookApp and FacebookAppbase classes and have found out that method Get is always accessing the Facebook (there is no any cache).

Pavel Surmenok
  • 4,584
  • 4
  • 30
  • 33
  • Thank you Pavel, that was exactly what i needed to know ;) – Gui Jan 19 '11 at 18:20
  • As a developer on the project, I can tell you that Pavel is absolutely correct. – DevTheo Jan 27 '11 at 12:43
  • I guess i'll some basic user information in another Cookie to avoid always connect to facebook everytime i want to display the name for example. Thanks – Gui Jan 27 '11 at 12:43