Skip to main content

Facebook authentication error - The operation couldn’t be completed



I have an option in my game for users to post an achievement to their wall. If they are logged in, i.e. their token is still active, it works fine. However, if they need to renew their token, the app exits and the Facebook authentication page loads for a second before returning to the app (they only need to click OK on the authentication page if they have actively logged out, otherwise it happens automatically).





The problem is that if this happens, when the game returns, the request fails. But since they're now logged in, if they were to press the 'share to wall' button a second time, it works fine. The error message output by the failed request it:







DIDLOGIN

2012-02-21 12:01:33.502[18153:15803] Response received

2012-02-21 12:01:33.502[18153:15803] Request did load raw response

2012-02-21 12:01:33.502[18153:15803] Request failed, error: Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0x9992010 {error=<CFBasicHash 0x99785e0 [0x2093b38]>{type = mutable dict, count = 3,

entries =>

2 : <CFString 0x9963370 [0x2093b38]>{contents = "type"} = <CFString 0x99952a0 [0x2093b38]>{contents = "OAuthException"}

3 : <CFString 0x99631e0 [0x2093b38]>{contents = "message"} = <CFString 0x997e5b0 [0x2093b38]>{contents = "An active access token must be used to query information about the current user."}

6 : <CFString 0x998c370 [0x2093b38]>{contents = "code"} = 2500

}

}







I'm not sure why I'm getting an OAuthException when I've just successfully authorised it?





Thanks for any help!


Comments

  1. when you set the dictionary of params that you send it to the facebook .. pass the acces token also ,, like this

    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
    @"someText",
    @"message",
    [fb accessToken],
    @"access_token",nil];

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.