Silverlight / WCF

Aug 25, 2009 at 9:43 AM

Hi ,

Anybody knows how I can use this authentication in Silverlight /WCF ?

This only allows an authentication from an asp.net page.

thanks

Coordinator
Aug 26, 2009 at 4:25 PM

Hi,

FBConnectAuth is intended for use on a server - it doesn't make sense to use this on the client-side (as you would in Silverlight).

Thanks,

Adam

Aug 27, 2009 at 6:39 AM

(WCF also runs on the server.) As I now understand it's not possible to do a silent login to facebook, you need some kind of user interface. I would like to do a silent login, but apparently it can't be done.

Coordinator
Aug 31, 2009 at 10:51 PM

Theoretically it could work with WCF, but it would only make sense to do this when using a RESTful style operation using AJAX. Specifically I mean WCF operations that are adorned with the WebGet and WebInvoke attributes. In that case you want to pass the cookies in the request to the FBConnectAuthentication.Validate() method.

This would work because once the user has authenticated themselves with Facebook Connect, the Connect cookies will be passed with every web request to your webservice, as long as it is on the same domain as specified in your facebook application preferences. Does that make sense?

Adam

Sep 1, 2009 at 6:55 AM

Yes, that makes sense. Anyhow, a login to facebook just can't be done in the background and needs an UI interaction.

Jul 6, 2010 at 6:22 AM

Check out this forum post that has a workaround to solve this issue: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/ffdf22f8-0df4-4ce4-bdee-632e4cbb5fbb