简体   繁体   中英

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

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

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.

The basic piece of information you need is to use the GetIdentities() call to get your

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM