FaceSharp with WCF Web Service?

Sep 23, 2010 at 3:09 PM
Edited Sep 23, 2010 at 7:07 PM



How can I integrate FaceSharp with a WCF Service?




Sep 27, 2010 at 8:34 PM

Can you please provide more detail as to what you are looking to do?

Oct 21, 2010 at 8:42 PM

I'd like to piggyback on this thread.

TOPIC: I'd like to call Facebook from my  WCF/REST service (.Net 4.0) using FaceSharp. 

The process would be something like this;

1.  The client would initially obtain its key using thier client app; a phone device, tablet, web app, etc...  After obtaining a users key information, it would be stored in database (SQL Server).

2.  On any given time, the user logs onto the device (ex. phone) and authenticates to the WCF/REST service I am providing.  The user request data from a number of different sources (facebook, linked in, etc...) via my WCF/REST service.  The data would be packaged and sent to the user client device for presentation.

Can FaceSharp obtain Facebook data from within WCF, given that WCF is not your traditional web/server (no cookies, GETS, user context)?  That is the user will not be logging directly but rather indirectly from the WCF services.  Should I consider other methods other than using FaceSharp?

Thanks, Andy

Oct 22, 2010 at 5:28 AM


I'm thinking that something similar to what you are approaching would certainly be possible with some minor tweaks.

Let me know your thoughts on the following ( as it would leverage Facesharp as best as possible)

1. User uses device of preference (phone / tablet / webapp) and authenticates with your application using their credentials via web browser

2. User then authorizes your application with Facebook and your web server ( using the offline_access extended permission ) via web browser

3. once the token is received (on the web server), then you can save the token to the database (essentially paring your app credentials with the session token) .

4. user then uses your application in any form (desktop/mobile/WPF whatever) which communicates through WCF to your server which in turn ties in with Facebook using the token from step 3 with FaceSharp

So in respects to the points above, FaceSharp can help out, if you wanted to remove the dependency of having the user to authenticate with your web server, and just authenticate locally (for desktop apps), this might require a little more work.. see http://developers.facebook.com/docs/authentication/desktop for how Facebook is suggesting that you do this, I think much of the Facesharp code could be used in this scenario.

Hopefully this helps. If you have more questions don't hesitate to ask.