Authentication using Facebook C# SDK

旧时模样 提交于 2019-11-29 14:23:12

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.

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

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/

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!

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