简体   繁体   English

如何在Azure移动应用程序服务(.Net后端)中访问用户数据

[英]How to access user data in Azure Mobile App services (.Net backend)

I'm working on an app using Azure's Mobile App services (as opposed to Azure Mobile Services). 我正在使用Azure的移动应用程序服务(而不是Azure移动服务)开发应用程序。 I've successfully implemented the single sign-on with FB (mentioned here: https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-how-to-configure-facebook-authentication-preview/ ), but now that I can log in I can't figure out how to access the user information on the backend (such as basic user information and access tokens). 我已经成功地通过FB实现了单点登录(在此处提及: https : //azure.microsoft.com/en-us/documentation/articles/app-service-mobile-how-to-configure-facebook-authentication-预览/ ),但是现在我可以登录了,我不知道如何访问后端的用户信息(例如基本用户信息和访问令牌)。

Could someone please provide an example or point me to a tutorial explaining how to access this data? 有人可以提供一个例子,也可以给我指出一个解释如何访问此数据的教程吗?

Take a look at the following tutorial blog post: http://blogs.msdn.com/b/carlosfigueira/archive/2013/12/16/enhanced-users-feature-in-azure-mobile-services.aspx - also http://blogs.msdn.com/b/carlosfigueira/archive/2012/10/25/getting-user-information-on-azure-mobile-services.aspx 请看以下教程博客文章: http : //blogs.msdn.com/b/carlosfigueira/archive/2013/12/16/enhanced-users-feature-in-azure-mobile-services.aspx-也是http ://blogs.msdn.com/b/carlosfigueira/archive/2012/10/25/getting-user-information-on-azure-mobile-services.aspx

This is written a while ago, and uses the NodeJS backend, but you should be able to translate this to .NET as the same basic information exists - you use GetIdentities() to get the facebook token, then use the Facebook REST interface or the SDK ( http://facebooksdk.net/ ) to get the rest of the information you need. 这是前一阵子写的,并使用NodeJS后端,但是您应该能够将它转换为.NET,因为存在相同的基本信息-您可以使用GetIdentities()获取Facebook令牌,然后使用Facebook REST接口或SDK( http://facebooksdk.net/ )来获取您需要的其余信息。

The basic piece of information you need is to use the GetIdentities() call to get your 您需要的基本信息是使用GetIdentities()调用来获取您的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用单个用户帐户的Azure移动服务.net后端身份验证 - Azure Mobile Services .net Backend Authentication using individual user accounts 找不到Azure移动服务端点(.NET后端) - Azure Mobile Services Endpoint not found (.NET backend) Azure移动服务.Net后端计划程序错误 - Azure Mobile Services .Net Backend Scheduler Error .net后端的Azure移动服务未找到错误 - Azure mobile services Not Found error with .net backend Azure移动服务,C#后端实际获取提供者的用户访问令牌 - Azure Mobile services, C# backend get actually user access token for provider 在本地计算机中使用Azure移动服务进行开发[.Net后端] - Developing with Azure Mobile Services in a local computer[.Net backend] 带有.NET后端的Azure移动服务-数据库中已经有一个命名的对象 - Azure mobile services with .NET backend- There is already an object named in the database Azure移动服务客户端将参数传递给.NET后端 - Azure Mobile Services client pass parameters to .NET Backend 如何使用Azure移动应用后端从Microsoft Graph中为经过身份验证的用户获取用户信息? - How do I grab user info from Microsoft Graph for authenticated user using Azure mobile app backend? 带有ASP.Net后端的Azure移动应用程序使用外键将数据发布到SQL Server表 - Azure Mobile App with ASP.Net backend posting data to a SQL Server table with a foreign key
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM