Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
So, even though init has to be called first, it will return failure, and then
you can use login. RTFE. Not sure how to make this more clear than you guys did
with your example. Thank you.
Original comment by jasondi...@gmail.com
on 11 Dec 2010 at 7:07
Original comment by edwar...@gmail.com
on 12 Jan 2011 at 11:03
I'm also experiencing this error. So...I can login if the third parameter is
omitted? This isn't in the documentation. If it's in an email sent when the
application is registered with the API, that isn't enough; we need explicit
documentation in the API reference.
Original comment by mbritto...@gmail.com
on 17 Jan 2011 at 5:48
Before making any calls you must initialize the api by calling init(). It will
call the callback method specified, and pass a response object or a fail object
(see examples). If you are already logged in, the response will be an
FacebookSession object and the fail object will be null. If you are not logged
in, then the response will be null and the fail object will be populated with
an error. All this means is that you are not currently logged in and you can
call login() at this point. There may be some confusion because the error
object states "An active access token must be used to query information about
the current user.". This is because we attempt to make an api call to '/me' in
order to verify if we are logged in or not during the init() method. If the
call was successful, the user data is stored off into the FacebookSession and
returned in the init callback. Otherwise, it returns the error. We do this
because there this seems to be the most reliable way to checking if the user is
currently logged in or not. The third parameter (accessToken) is completely
optional and is available to developers who wish to manage their own access
tokens/sessions.
Original comment by edwar...@gmail.com
on 17 Jan 2011 at 6:34
Thanks for the reply. imo the error should be changed to 'invalid oAuth access
token. You may continue with the login process.'
Original comment by mbritto...@gmail.com
on 17 Jan 2011 at 6:47
I have a situation where the result and fail objects returned are both null.
For some users this isn't the case. I still haven't figured out the solution
but I think it's to do with whether a user has added the app - you know, that
permission prompt you get when you first start using an app. If you haven't
manually forced that then Facebook.init() doesn't work.
Original comment by bedroom...@gmail.com
on 8 Feb 2011 at 8:13
Original issue reported on code.google.com by
jasondi...@gmail.com
on 11 Dec 2010 at 5:49