views:

473

answers:

9

As soon as the user is logged in, I retrieve the user info using this code:

[_facebook requestWithGraphPath:@"me" andDelegate:self];

It worked for the first few times, but it eventually returned an error. I thought it was a session thing since I have "offline_access" on my permissions. I logged out from Facebook and compiled again from a clean build and it still returns this error:

Error Domain=facebookErrDomain Code=10000 UserInfo=0x54a2930 "Operation could not be completed. (facebookErrDomain error 10000.)"

I'm assuming my access token is valid since I can do posting. Am I right to assume that?

I also noticed that whenever I log in, Facebook doesn't redirect me to ask permission if I allow my app to access my user info.

Can anyone tell me what's wrong?

A: 

I have the exact same problem today, but it worked yesterday.. :(

Have you found any solution on your side?

Mattias
A: 

I'm having the same problem as well. Can someone check with Facebook if their Graph APIs are working?

By the way, queries using the REST API seems to be working.

inervy
A: 

I've had this problem, mainly because my Facebook account has is maxed on privacy.

It's most likely the permissions that you passed in during login. BY default it will only give access to public info. Remember there is less and less info that is public in Facebook.

Try changing your permission to something like "read_stream",nil

Then instead of [_facebook requestWithGraphPath:@"me" andDelegate:self];

Try using [_facebook requestWithGraphPath:@"me/home" andDelegate:self];

This should return your news feed. Worked for me 5 mins ago.

DavidAWalsh
A: 

I'm having the exact same issue, it was working yesterday (all day) and stopped last night. Still not working. Tried the above approach and it did not work.

It's odd that it just stopped working for all of us, I'm wondering if it could somehow be a backend Facebook issue???

cic100
A: 

same for me and even FQL doesn't work correctly

mik
A: 

Does anyone know how to get in contact with someone at Facebook to ask what has happened? I can't find a support form/contact info..

Mattias
A: 

Not much to add here, doesn't work here too. I use the iOS SDK to post to the stream and it worked until yesterday. Today my client called me and complained. Ugh.

I have requested the offline access permission and of course the "publish_stream" permission...

Marc-André Weibezahn
OK so I have also forced the isSessionValid method to return "YES" and it does work. But I definitely don't want to ship with such a hack in my code that could mess things up in the future.I hope there will be some communication from Facebook about this issue soon.
Marc-André Weibezahn
+1  A: 

Answer on authorize command seems to be different. Now, there's no expiration date as it was before. I tried with forcing isSessionValid to return TRUE, and it works.

isSessionValid checks accessToken AND expirationDate. As there's no expiration date, the function return FALSE.

Don't know if it's a temporary modification from facebook, or definitive one. In this case, SDK must be fixed, I presume. And a new call must retrieve expirationDate.

ze4
Thanks this works.
marie
It's seems to be fixed by Facebook today. Now there's an expirationDate (expires_in='value') if no offline_access is requested, and expires_in=0 with an offline_access.
ze4
yeah.. it works perfectly now. thanks for the info.
marie
A: 

Here's a temporary fix I've used. You can find this method line 46 in FBLoginDialog.m

- (void) dialogDidSucceed:(NSURL*)url {
  NSString *q = [url absoluteString];
  NSString *token = [self getStringFromUrl:q needle:@"access_token="];
  NSDate *expirationDate = [NSDate distantFuture];

  if ((token == (NSString *) [NSNull null]) || (token.length ==0)) {
    [self dialogDidCancel:url];
    [self dismissWithSuccess:NO animated:YES];
  } else {
    if ([_loginDelegate respondsToSelector:@selector(fbDialogLogin:expirationDate:)]) {
      [_loginDelegate fbDialogLogin:token expirationDate:expirationDate];
    }
    [self dismissWithSuccess:YES animated:YES];
  }
}

Does everyone with this issue request the offline_access permission? It's the only reason I can see an expiration date not being sent. Maybe try not requestion the offline_access permission.

Nick Babenko
Hey thanks for this, it worked. Btw, I also tried not requesting for offline access and it still returns a null expiration date.
marie
Facebook fixed it. It works fine now.
marie