Facebook C#sdk - FacebookApp.Get(“我”)是否访问Facebook或只是为了cookie? [英] Facebook C# sdk - Does the FacebookApp.Get("me") access to Facebook or just to cookie?

查看:113
本文介绍了Facebook C#sdk - FacebookApp.Get(“我”)是否访问Facebook或只是为了cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Facebook c#sdk在一个新的项目,我有一个问题。
在以下代码中:

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

当我调用方法 Get FacebookApp,我只是访问保存的Cookie,当我通过Facebook认证或我连接到Facebook和获取价值?



我是询问是因为我在Facebook上保存会话中的用户值,但是如果Get方法不能访问Facebook和Cookie,那么我将停止使用该会话并开始访问到Facebook的cookie(我还不明白,如果cookie保存一些关于用户的信息,但我已经在VS的看窗口中搜索,我还没有找到任何东西)



谢谢

解决方案

我已经检查了FacebookApp和FacebookAppbase类的源代码,并发现该方法获取总是访问Facebook(没有任何缓存)。


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

解决方案

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).

这篇关于Facebook C#sdk - FacebookApp.Get(“我”)是否访问Facebook或只是为了cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆