Facebook sessionValid() always fail on initial startup

Social Media Widgets / In-App Purchases / HTTP

Facebook sessionValid() always fail on initial startup

Postby stephensullivan » Wed May 09, 2012 12:11 pm

On ios the isSessionValid function of the facebook library looks at the access token and the expiration date to see if the session is valid. They show the example below to illustrate how you can start the app without logging in every time. The MOAI sdk doesn't let you et the expirationDate so MOAIFacebook.sessionValid() always fails. Is there a way you can make a MOAIFacebook setExpirationDate & setExpirationDate function available in the interface?

objective c example from facebook website:

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:@"FBAccessTokenKey"]
&& [defaults objectForKey:@"FBExpirationDateKey"]) {
facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
}
stephensullivan
 
Posts: 18
Joined: Wed May 09, 2012 12:05 pm

Re: Facebook sessionValid() always fail on initial startup

Postby refactor » Thu Jun 07, 2012 3:03 am

I made a patch for the issue and request for pull to moai-beta.

https://github.com/moai/moai-beta/pull/46
refactor
 
Posts: 41
Joined: Thu Mar 01, 2012 10:25 pm


Return to Advertising + Networking + IAPs

Who is online

Users browsing this forum: No registered users and 0 guests

x