0
林试图让Facebook用户ID保存在我的数据库,但我得到这个错误:获取.NET Facebook用户ID
System.NullReferenceException: Object reference not set to an instance of an object.
进出口使用Newtonsoft.Json.Linq和方法SelectToken
得到"registration.id"
下面是代码:
string FB_ID= o.SelectToken("registration.id").ToString();
string FB_Firstname = o.SelectToken("registration.first_name").ToString();
string FB_Lastname = o.SelectToken("registration.last_name").ToString();
我能顺利拿到名字和用户的姓氏,但串FB_ID给我未将对象引用设置为对象错误的实例。