I've developed an iOS app that is integrated with Facebook to allow users to log in using their FB accounts. That works fine.
The app is also supposed to use a web service developed by another company. Said web service also uses Facebook integration.
Both my app and the web service were developed using different Facebook developer accounts. Now it seems a major problem I've got needs both of these to be part of the same "Facebook application" which means they'd have to belong to the same Facebook developer account.
I asked the other company's developer to add a native iOS aspect to his Facebook app, gave him my app's bundle ID and received a Facebook app ID and secret in return. I made the appropriate changes to my app's Info tab in XCode - the bundle ID is the same one that I gave him, the FacebookAppID is the one I got from him and so is the URL Schemes thing (with an "fb" preceding the actual FBAppID).
However, when I try to log in using Facebook credentials in the app, I constantly get com.facebook.sdk error 2 which is explained in the console by this message: FBSDKLog: System authorization failed:'The Facebook server could not fulfill this access request: remote_app_id does not match stored id '. This may be caused by a mismatch between the bundle identifier and your app configuration on the server at developers.facebook.com/apps.
Is there a step I'm missing in this transition of app between FB developer accounts? Could something else be the cause of the problem here? If my question is off-topic, please at least point me in the direction where I could get some answers.
Indeed - it turned out that the problem was exactly what the error message said: the bundle ID was different for both the application in XCode and in the Facebook developer account; that was because the developer from the other company made a spelling mistake (lower case instead of upper case letter) in the bundle ID.
Related
We have an issue with the implementation of the apple sign in on the web page: Apple recenlty changed the guidelines for the usage of the "third-party login service".
Since our app use facebook and google sign-in service, we cannot update the Apple Application on Apple store since we don't offer the sign in with safari.
So we are developing the sign in with apple in the App and on the web page, but we have some trouble during the setup of the service ID.
We have created a new Service ID with a new identifier id, but when we try to enable sign in we see an error "This request is forbidden for security reasons. The bundle '' is not a primary App."
This is quite strange because the bundle is yet enable as primary App.
We have read that someone else also have this problem, by enabling Apple sign in with an existent app.
Is there someone who can help me? Without Apple login we can not upload any new version of the app. We've already written to the apple developer support but they can't help us.
Thanks.
Below 3 screenshot of the Apple setup.
You need to:
Uncheck Sign In with Apple inside your app identifier
Save the identifier
Again go to identifier settings and enable Sign In With Apple
Now you can add Services Identifier using this app bundle
I was finally able to solve this after hearing back from Apple developer support. I had to:
go to the primary app's identifier
go to the identifier's apple sign in configuration
remove the server to server notification url
save the identifier
Then I could create and configure the service identifier without any errors. After I did that, I went back and re-added the server to server notification url and saved the app identifier.
I've integrated Google SignIn (2.2) based on instructions here:
https://developers.google.com/identity/sign-in/ios/start
It works when there is no Google app on the device. So Google SDK opens a web view where I can sign in a google account, and GIDSignInDelegate method didSignInForUser is called with a valid access token with no error.
But if I have Google app or Youtube app installed, the SDK will open the Google app, where I can sign in my google account, and when I choose the account and it redirects back, it throws an error:
"A potentially recoverable error occured. You may try again."
No matter how many times I retry it never worked.
(Deep link url:
com.googleusercontent.apps.<my app id>://api/sso/v1/tokenResponse?ec=-216414001&e=A%20potentially%20recoverable%20error%20occured.%20You%20may%20try%20again)
Has anyone seen the same issue? What could go wrong?
So it turns out to be a typo in the app bundle id in Google Developers Console.
As requested in some comments, here are some more details:
In order to support google sign in, you need to a client id in
https://console.developers.google.com
under APIs & Auth/Credential
In our case, we were seeing the error because in the client id we created for iOS app, we had a typo in the app bundle id. (Instead of com.companyname.appname we typed com.companyname.companyname)
I guess there can be other ways to cause the same error, but one good place to check is the developer console (https://console.developers.google.com), just make sure every field makes sense to you.
Create a new Configuration file here -> https://developers.google.com/mobile/add?platform=ios&cntapi=signin&cntapp=Default%20Demo%20App&cntpkg=com.google.samples.quickstart.SignInExample&cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fios%2Fstart%3Fconfigured%3Dtrue&cntlbl=Continue%20Try%20Sign-In
When it asks for your iOS Bundle Id, make sure it matches the bundle id that you find in your Xcode project settings (target -> General -> Bundle Identifier)
Delete the old "GoogleService-Info.plist" file and replace it with the new one you just created
clean, rebuild, try to sign in again
We are developing an application which uses google plus share's sdk 1.7.1 .It was working fine until we changed the bundle-id in console of google Developers.So we create a new client-id,the it started giving an error 500 in safari after loging in succesfully just before redirecting to the app.we have checked the schema which is correct.This issue does not occurs every time.
We have also set the Url Types both identifier and schema correctly.
Just to confirm your steps:
Register iOS app in developer console
Change app bundle ID
Sharing breaks (error 500)
You change the bundle identifier associated with the client id shipping in your app
Sharing is still broken.
A few things that could break this:
Updating the bundle identifier sometimes causes issues, you might want to register an additional client all together and use this client ID.
Ensure that you have updated the Client ID in your sample to match any changes in the client ID that could have occurred in the console.
I'm trying to integrate Paypal login within my Rails app and I can't make it work.
I was following the guide: http://cristianobetta.com/blog/2013/09/27/integrating-login-with-paypal-into-rails/
I created an application from the paypal developer site, and set the followings:
App return URL (test): http:/ /localhost:3000/auth/paypal/callback
App return URL (live): http:/ /localhost:3000/auth/paypal/callback
and I get the error:
"Relying Party Validation error: redirect_uri provided in the request does not match with the registered redirect_uri. Please check the request."
when I try to visit the URL:
http:/ /localhost:3000/auth/paypal
Interesting enough, I get the same error if I input my application credential in the official Paypal API integration tool:
https://devtools-paypal.com/guide/openid/ruby?interactive=ON&env=sandbox
Any ideas?
Thanks
This has changed a bit since the accepted answer, and will presumably change again soon... but here's how you do this now.
Log into developer.paypal.com
Click on Dashboard (https://developer.paypal.com/developer/applications)
Click your app name under "Rest API Apps"
Scroll to the box at the bottom of the screen labeled "Sandbox (or Live) App Settings
Set the Return URL (Where users will be redirected after test transactions)
Click save
NOTE
This Return URL must exactly match the redirect_uri that you pass in via querystring (so it's confusing as to why you'd need to pass it in in the first place)
GOTCHA
At this point in time, the Return URL can seemingly never be updated. In my recent experience, if you don't type it correctly the first time you save it, you will have to create a new app.
You need to set this value inside of your sandbox application on the developer website.
Log into developer.paypal.com
Click Applications
Under My Rest Apps click your App name
Click Edit next to App redirect URLs
Set the return URLs for live or test
Save
I resolved it by setting both the live and test redirect URLs to the same thing.
Plus, I ensured that I ticked to get Personal Information from the advanced settings panel, also adding URLs for privacy and agreement links.
The portal hung when set to localhost addresses for those links, so possibly PayPal tried to dereference them, so I put in real fake URLs.
I was encountering this issue myself, albeit in a Sinatra rather than Rails app - like you, I was using http://localhost:4567/auth/paypal/callback as the return URL - changing it to http://127.0.0.1:4567/auth/paypal/callback on the PayPal dev portal and accessing my app from 127.0.0.1 rather than localhost fixed it for me.
Background
Recently upgraded to Facebook SDK 3.2
Tested on both device and simulator (iOS 5.1 through 6.1)
Error is only present when attempting to authenticate Facebook test users.
Error
The Facebook server could not fulfill this access request: Temporarily unable to make API calls on behalf of XXXXXX.
UserInfo={com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:SystemLoginCancelled, com.facebook.sdk:ErrorInnerErrorKey=Error Domain=com.apple.accounts Code=7}
Steps to Reproduce
Clear simulator or manually remove Facebook account from device settings.
Create a test user via Facebook's accounts/test-users endpoint.
Add Facebook account in device settings.
Authenticate via openActiveSessionWithReadPermissions & accept the permissions dialog.
Expected Result
FBSessionStateHandler block returns with state == FBSessionStateOpen.
A nil NSError.
Actual Result
FBSessionStateHandler block returns with a error.fberrorCategory == FBErrorCategoryUserCancelled with the above user info trace.
Solution Attempts
I've followed the steps outlined in this question; namely checking my bundle name, ensuring my app type is set to Native/Desktop and setting my App Secret in Client to NO.
As well, I have ensured I am only asking for read permissions (ie. email).
I've even bypassed the Facebook SDK altogether by attempting to authentication with a ACAccountStore instance & got the same results.
Again, everything works fine with a regular user (non-test); so it must have something to do with the configuration & recent 3.2 changes.
1) Facebook 3.1 SDK splits read and publish permissions. Use only read permissions (e.g., email) in the first authentication call. Using both will break it and result in that generic error. It seems Facebook's SDK doesn't actually do what it's meant to do: fall back to older authentication methods. David tells me an updated Parse SDK will make the permissions split easier, but it will of course be up to Facebook to fix that bug in their SDK.
2) Independently, the issue I was having seems to have gone away after signing out of Facebook in the device's Settings, and then back in. Maybe a glitch in the iOS integration? (The permissions split issue still applies here, however. Make sure you do read first and publish (e.g., publish_actions) separately later, the first time you actually need it.)