执行此操作时,输入来自LinkedIn:
LoginRadiusSDKv2.LoginRadius loginradius = new LoginRadiusSDKv2.LoginRadius("<API SECRET>");
if (loginradius.IsAuthenticated)
{
var userprofile = loginradius.GetBasicUserProfile();
不返回有用的数据,只返回userprofile.ID。对于其他提供商,我显示电子邮件地址,(对于twitter,userprofile.ProfileName)。
我要为linkedin显示什么?我可以在LoginRadius网站上找到这个特定提供商的任何文档。
答案 0 :(得分:0)
Todd - 如果该用户的ID提供商存在,您可以获得基本的用户个人资料数据。 Linkedin和Twitter不提供用户个人资料数据中的电子邮件地址,因此您必须为其添加特殊检查:
if (userprofile.Email != null) { }
您可以使用以下参数获取更多数据:
userprofile.FirstName //first name of user
userprofile.FullName //full name of user
userprofile.Gender //gender of user
userprofile.ID //ID of user on provider
userprofile.LastName //last name of user
userprofile.MiddleName //middle name of user
userprofile.NickName //nick name of user
有关ASP.net SDK的更多文档,请参阅此链接:https://www.loginradius.com/developers/implementation/dot-net-websites
其他一些信息:
要查看实时存在哪些数据,您可以在PlayGround部分查看它:https://www.loginradius.com/developers/apiplayground
如果您需要有关LoginRadius实施的任何其他信息,请告诉我。
谢谢,
迪帕克