Authentication using Facebook C# SDK

删除回忆录丶 提交于 2019-12-18 08:35:33

问题


How can I authenticate with a username(email) and password? The samples provided just calls "authorizer.Authorize()" without credentials (which simply throws an "Invalid URI" format exception for me). Do I need an accessToken and if so, how do I get one?


回答1:


You cannot authenticate with a username and password. You must use OAuth to authenticate a user. Facebook does not permit application developers to collect usernames and password from users.




回答2:


This tutorial should help you: Getting Started with the Facebook C# SDK




回答3:


I am not sure what you are trying to do exactly. But here is my experience and my knowledge of authentication.

In order to authenticate a user, you need a facebook application (specifically app id and server code), the user has to input their username and password and allows your app to access their data.

This authorization process will generate an access token that will your facebook app to access the user info. Note that this access_token expires often and in which case you need to authenticate again.

http://developers.facebook.com/docs/authentication/




回答4:


Follow this youtube link and you might understand how you will get authenticated using ur website. this will redirect you to facebook where you have to log in, so if you want a random user on ur site to authenticate they will be redirected to facebook log in if u use the code from this example:

Facebook Auth Example

Hope this is what your looking for m8!



来源:https://stackoverflow.com/questions/4610087/authentication-using-facebook-c-sharp-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!