首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在使用LoginRadius时从LinkedIn提供商获取姓名、电子邮件或昵称

如何在使用LoginRadius时从LinkedIn提供商获取姓名、电子邮件或昵称
EN

Stack Overflow用户
提问于 2012-04-24 15:11:10
回答 1查看 1K关注 0票数 0

执行此操作时,输入来自LinkedIn:

代码语言:javascript
复制
LoginRadiusSDKv2.LoginRadius loginradius = new LoginRadiusSDKv2.LoginRadius("<API SECRET>");
if (loginradius.IsAuthenticated)
{
    var userprofile = loginradius.GetBasicUserProfile();

没有返回有用的数据,只有userprofile.ID。对于其他提供者,我显示电子邮件地址(对于twitter the userprofile.ProfileName)。

我应该为linkedin显示什么?我可以在LoginRadius网站上找到这个特定提供商的任何文档。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-04-25 23:44:56

Todd -如果用户的ID提供商存在基本用户配置文件数据,则可以获取该数据。Linkedin和Twitter没有在用户档案数据中提供电子邮件地址,因此您必须对其进行特殊检查:

代码语言:javascript
复制
if (userprofile.Email != null) {  }

您可以使用以下参数获取更多数据:

代码语言:javascript
复制
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软件开发工具包的更多文档,请参阅此链接:https://www.loginradius.com/developers/implementation/dot-net-websites

一些其他信息:

要查看实时存在的数据,您可以在PlayGround部分查看它:https://www.loginradius.com/developers/apiplayground

如果您需要任何其他信息来实现LoginRadius,请让我知道。

谢谢,

深度

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10293315

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档