Here's how I currently use the Facebook C# SDK, with Facebook Javascript SDK (this is from memory, but I think it's accurate psuedo-code):
FbApp = new FacebookApp
Is FbApp.Session null?
No - they're logged into Facebook, pull profile from DB
Is profile null?
Yes - they aren't a member, ask for permission then save their FacebookId, Name, and Email
No - they're a member
Yes - they're not logged into Facebook
That's really about it. But reading through the tutorial here, I'm wondering if I'm doing something the wrong way? Or a "bad" way? I've been using it th开发者_StackOverflow中文版is way for around 3 months without issue.
I've read others having issues with Facebook changing their authentication API's, but I've never had any hiccups. The Facebook C# SDK has been updated a few times sine I started using it, but I haven't upgraded yet.
Just want to be sure, what I'm doing is ok or am I heading for a "train wreck"?
The best way I think is to understand the Facebook API yourself ( http://developers.facebook.com/docs/reference/api/ ) . Using library will help you but it will make you dependent with the library. Facebook is famous for its frequency of changing API. So depending entirely on a library will likely make your job more stressful ( worse if the library took long to update).
Just my 2 cents
精彩评论