当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net - Granting permission with Facebook C# SDK

问题描述:

I have an ASP.NET MVC Site in which I would like to allow my users to grant access for my app to post to their facebook account.

My site already has log-in and auth set up, so I do not currently wish to use FB for auth/account creation.

I suppose I would like something like twitter provides, to allow users to grant access to their fb account.

Are there any samples of how to accomplish this? I am not having much luck with the docs

网友答案:

I'm right now building exactly the same thing!

Use the http://facebooksdk.codeplex.com/ - Facebook C# SDK.
In MVC you can add it with NUGET (search for FACEBOOK - MVC) by NTotten.

Once you added it, use the tutorial from codeplex to integrate Facebook authentication for your app.

THEN in your user database add a custom field - and link the facebook userID to the regular user ID. The same way, e.g. stackoverflow.com has done it.

Seperate user accounts from real authentication.

YOUR site manages the user accounts, authentication is managed seperately(e.g. facebook, live-id, openid, your own id).

Makes sense?

分享给朋友:
您可能感兴趣的文章:
随机阅读: