I'm having some trouble handling Facebook errors.
My app displays a page that tells users they've blocked the app when the login fails.
This page tells the users to go to settings>>privacy>>facebook and unblock the app.
I navigate to this page if the sessionStageChanged method contains an error.
I am however noticing a problem when a user changes their password, which will invalidate the iOS Facebook integration login, this will off course result in the error message not being correct anymore.
I've created another error page that tells the user that their password within ios integration has expired but I'm having trouble to figure out when I need to navigate to it.
-Both the different types of failure return Facebook error 2, which is a pretty generic error so I can't find what caused the problem from this error code.
-I've found another answer on here that used the [FBSession renewSystemCredentials] method but I am noticing that this will also return the ACAccountCredentialRenewResultFailed || Rejected error in both cases so this also won't work.
-I found the official documentation with this page: https://developers.facebook.com/docs/facebook-login/testing-your-login-flow/ but this does not have a solution only an explaination.
What should I do in this case?
How do I now when to navigate to the app blocked page and when to navigate to the password changed page?
I'm using Facebook SDK version: 3.10.0.
Thanks in advance!
Thanks for the comments.
After Ming Li's answer I found some stuff on this page: https://developers.facebook.com/docs/ios/errors
But after testing it in my app the Facebook error returned the same error for an invalid login.
I'm going to handle this by letting my user manually navigate trough the different types of solutions.
See the "Handling Errors" section of this page for strategies on how to notify users of different types of errors: https://developers.facebook.com/docs/graph-api/using-graph-api/#errors
Related
Since few days I have problems with the API instagram. Instagram sending this error page after the user has entered this login information.
"This page could not be loaded. If you have cookies disabled in your browser, or you are browsing in private mode"
Do you know why ? How to do ? Need help
On webapp authentication... the problem is related to instagram platform. I found that the problem arise only if your browser don't have the instagram cookie "ig_cb" set. This is set when you accept cookie policy on instagram.com. The workaround is to go on instagram and accept cookie policy then go back to your social auth and proceed.
This happens for both mobile and desktop users (browser).
Being a block on instagram login process... I guess there's no definitive solution other than wait for instagram bug fix.
I hate to be the bearer of bad news, but we also had this problem, which flagged on the Facebook Dev page: https://developers.facebook.com/support/bugs/406930029718049/
They have looked into the problem, as a number of us have had this exact issue too. It is only affecting EU user, as our US users are logging in and signing up without problems, and it seems that Facebook are refusing to look into it - their Instagram Platform API forum has already stopped accepting issues.
In terms of what we have learnt since last week, we think:
It is likely GDPR related
Not all apps have been affected, Bumble does not have this problem but Tinder does
It is happening with both the old Platform API and Graph API, according to a developer who has already migrated to Graph.
No one seems to know anything!
UPDATE:
So it seem's it is in fact a cookie issue on mobile. When a user goes to sign in on mobile view, the 'accept cookie' message that typically appears on web doesn't appear. However, when the error screen pops up, if you click 'Log in' in the top right, it will redirect you to the web view, which lets you accept the new terms and conditions. Then, once you direct back to mobile the cookie seems to have been saved and you can now login. This has worked for us on iOS so far, but not Android, and we still haven't come up with a work-around yet.
This bug has now been fixed.
Thank you all for your comments, individual input, and patience while we worked to address this issue for everyone.
I am happy to report that this particular issue with Instagram login should now be resolved, but if you are still seeing any issues related to this fix, please let us know on this report only.
When I'm already logged in on Instagram and try to add Instagram account to my app then it works just fine. But, when I'm not logged in on Instagram and try to add it to my app then it fails with 500 server error with the exception AuthStateForbidden: Wrong state parameter given.
The same works fine for Twitter, Facebook, and LinkedIn for both the cases (already logged in and not logged in).
I've tried all solutions suggested here, but nothing seems to work for me.
I understand the exception is because the state sent and received and not same! Below are the sent and received state values.
state: hhlonbffpevl8kjirdppbc6v6zmalhcy
redirect_state: HHlONBFfpevl8kjIRDPPBc6v6ZMALhCY
As you can see it's just the case issue! Why is this even happening? How do I resolve this? Please help!
so I'm implementing the option to login with your linkedin account, but I find that sometimes you will get a request error saying:
Request Error
We’re sorry, there was a problem with your request. Please make sure you have cookies enabled and try again.
Or follow this link to return to the home page.
So I did some digging and I found that this error pops up if you don't have a certain cookie from linkedin called JSESSIONID. This is only created when you go to linkedin.com, but not my extension authentication page. Anyone have an explanation and a solution?
Thanks
Here is a work around:
link to an approved solution
it provides a java implementation, and they point out it is more about the version of the library you are using.
hopefully it helps.
I am trying to get the user's contact details by singning up with twitter in my app. I found this project on github which seems really good. I encounter only one problem. If I run it with my new app consumer secret and consumer key codes from twitter it gives me an error :
Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x6898e80 {NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSUnderlyingError=0x68980e0 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1012.)"}
The output in the console is :
2013-01-16 17:55:24.367 DMTwitterOAuth[3411:c07] current status = Prompt for user data and request token to server
2013-01-16 17:55:24.371 DMTwitterOAuth[3411:c07] current status = Requesting token for current user's auth data...
2013-01-16 17:55:25.433 DMTwitterOAuth[3411:c07] current status = Token received from server
Immediately after I get the alert view in which it says that it encountered a NSURLErrorDomain.
On the other hand, if I run it with some other codes from another twitter app it works, giving me all the details about the user. I just can't understand why for some keys it works, and for some others it doesn't.
Error code -1012 is kCFURLErrorUserCancelledAuthentication. This should mean that some code somewhere called [sender cancelAuthenticationChallenge:] in response to an authentication challenge. This is likely code inside of DMTwitterOAuth, but it's also possible it's Apple's own code inside the URL-loading system.
Make sure that your twitter application access settings are appropriate for what you're trying to do. If you're trying to post a tweet you'll likely need Read and Write access.
See the Application Model docs for more info.
It can be also just wrong authentication data in request header.
Visit the below url it solves the issue generally not in specific to this twitter context.It will give u some idea
https://stackoverflow.com/a/17920301/730807
I hope this helps..
I have recently found this problem occurring in projects where previously Twitter login was working. For this reason I assumed it was due to the change in iOS or maybe an upgrade in the Twitter feature.
One of the main issues is it is almost impossible to recreate this issue, there is a very interesting twitter community blog talking about it here: https://twittercommunity.com/t/ios-twitter-kit-1-10-1-twtrloginbutton-responds-with-1012-error/52766
The Twitter staff are trying to fix this issue but can't recreate it to see what is going wrong.
The problem seems to be that the users Twitter account has become disconnected from their device. This means that the Twitter Auth Helper can't get your details to login correctly.
The way to fix this is to go into settings -> Twitter and then click on your Twitter account name. For me this then prompted me to re-input my password as the account wasn't currently connected. Very frustrating and difficult to find as there is no indication until you click your Twitter account.
I found this solution applied when attempting to login with a Twitter account using Firebase.
According to Twitter, the fix is live in SDK version 1.14.1.
iOS app: - I am integrating google+ API in my iPhone application, i downloaded google+ API through this link:- "https://developers.google.com/+/mobile/ios/sdk/google-plus-ios-sdk-1.0.0.zip".
I have successfully integrated it in my code, but when i am trying to get user information, it is giving me error "The operation couldn’t be completed. (Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.)",
Any idea about this..!! Why this error comes.?
It says "All API calls require either an OAuth 2.0 token or an API key."
So you should get an API key and pass it as a parameter
https://www.googleapis.com/plus/v1/activities/z12gtjhq3qn2xxl2o224exwiqruvtda0i?key=YOUR-API-KEY
This issue happens when you are already logged in and still try to login again and again. I faced same error so did some experiments
1) I opened website on my mobile and everything was fine.
2) Then i tried on another laptop and used different gmail account to login and it again worked fine.
3) On my first laptop i tied again by clicking "Signin" button i got same error, so i opened google.com then logged out completely and then tried again, this time it worked.
So i believe, Issue is clicking login button again and again without logout.
I am not sure if this is a really a issue, but atleast this is what i found. I am still trying, trying and trying , will post if i found anything else.
Cheers !!