ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated

Jul 5, 2007 at 6:04 AM

ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.

I get this message when I try to use the publishStory, sendNotification or sendRequest functions. I'm using v 1.2 binaries. Any ideas?

Thanks in advance.
Jul 5, 2007 at 2:20 PM
This is an error message that typically means that you are trying to display our hosted login form from a webpage.

Is it a canvas app? Do you have IsDesktopApplication set to false?
Aug 3, 2007 at 11:04 AM

I'm trying to call the ConnectToFacebook method on a Background Worker.

The "single-threaded apartment" message is being returned.
I have tried both the AsyncFacebookService object and FacebookService.

Is this by design?

Aug 7, 2007 at 4:35 AM
Yes. You can't do it on a background thread. Because there is a UI element as part of that ConnectToFacebook process. The only way to get that login is to display the facebook login page.
Aug 7, 2007 at 8:43 AM
I see. Not a problem!

Thanks Ryan!