Problems using FDT V3.0 with offline_access

Jan 27, 2010 at 1:52 PM

Hi,

I used the previous version (2.0) for a couple of my apps and everything was simple those days :)
I have an Web app that requests offline_access from the user, stores his sessionKey in the DB and interact with his profile from a WindowsService (post stuff to his profile, send notifications etc)
In order to do this in the previous version  I just created a new facebookService, initialize the sessionkey and userId with the proper values from the DB and I was good to go but in this version I got a bit lost and keep on getting "Incorrect Signature" errors and "The underline connection was closes unexpectedly"...

1. Which of the sessions I should use? desktop/connect/canvas?

2. What kind of application I should define in facebook? (desktop/web) 

3. Can someone post a sample code that works for this kind of requirements? 

This is my code I need to run in offline mode, that is the user isn't in from of the computer,
This code continues to fail (I tried to use both Connect and Desktop):

(BTW the isConnected returns true....)

ConnectSession session = new ConnectSession("xxx", "xxx");
 //DesktopSession session = new DesktopSession("xxx", false);

 session.UserId = xxx;
session.ApplicationKey = "xxx";
session.SessionKey = "xxx";   
Api api = new Api(session);
 List<long> ids = new List<long>(){xxx};
 user u = api.Users.GetInfo();

Thanks,

Netanel

Jan 27, 2010 at 3:06 PM

here is some working code.  I run this in a batch process every day.

http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=75412

I do still get "the underlying connection was closed unexpectedly" errors.  I attribute this to transient internet latency, or Facebook flakiness, so I have implemented retry logic to retry up to 3 times.  This works pretty well...but there are exceptions like this morning at 6:00 AM PST I had 90 of these timeout errors that failed after the 3 retries.

 

Jan 28, 2010 at 4:35 PM

I have the same problem, trying to write an app that asks user to login once then remebers there details and stores them in a db.

The app is a WebForm app, so I assume I must use the ConnectSession?

Desktop apps can use DesktopConnection that has an overload to request extended permissions.

V2 used to have a session.showExtendedPermissionsDialog (or somthing like that) - again to request the user grant permissions, but I can't figure out how you get the required permissions!

The example above only shows how to publish something, but I can;t see how it gets permissions to do it?