How to get extended permissions v2.1

Nov 2, 2009 at 9:25 PM

Hello, i started using this toolkit a week ago, i'm trying to post on users wall, but im facing some trouble.

How can i get the extended permission for that?

I've tried several codes, but always, when i run the method GetExtendedPermission i got an error: cannot be instantiated because the current thread is not in a single-threaded apartment.

I'm using this code (implementing CanvasIFrameBasePage):

FacebookService fbservice = new FacebookService();

fbservice.ApplicationKey = base.API.ApplicationKey;

fbservice.Secret = base.API.Secret;

string sessionKey = base.API.SessionKey;

string userId = base.API.uid.ToString();

fbservice.GetExtendedPermission(Enums.Extended_Permissions.publish_stream);

Thanks in advance.

 

 

 

Nov 5, 2009 at 12:23 PM

Is it a desktop or web app?

I'm not familiar with the GetExtendedPermission() Method on the toolkit
But, if it's a web app - did you ask the user for extended permissions on your application?
You need to popup the extended permission window from facebook using JS (it's a lite modal) with the appropriate permissions you need
for your application.

Im using this Connect JS function: FB.Connect.showPermissionDialog("offline_access", callback);

It pops up the permissions dialog and after the user approved/disapproved the permissions the callback function is being called.

Only then you can actually do stuff that you need the extended permissions for.

You can find more info on the facebook API documentation page.

Netanel