I'm testing backand platform and got this error
http://localhost:8100/?ionicplatform=ios&error=%7B%22message%22:%22Cannot%20insert%20duplicate%20key%20row%20in%20object%20%27dbo.durados_UserSocial%27%20with%20unique%20index%20%27IX_durados_UserSocial_UserId_Provider%27.%20The%20duplicate%20key%20value%20is%20(387068,%20facebook).%0D%0AThe%20statement%20has%20been%20terminated.%22,%22provider%22:%22facebook%22%7D#/tabs/dashboard
This is a project started from http://market.ionic.io/starters/ionic-backand-with-social according to Getting started mobile.
I couldn't get any match on google
I think it could be because I'm logging in with the same account that I created the app in backand, however, shouldn't it be possible to just make a login instead of try to register it (or whatever it's trying to do)?
This worked with project default keys for facebook.
Related
It worked ok. I logged in with facebook.
After a while, i don´t know exactly the reason, when I try to login with facebook, it starts to show:
Invalid key hash. The key hash ..... does not match any stored key hashes. Configure your app key hashes at http://developers.facebook.com/apps/...
The hash key that is showing in the error message it´s not the hash key set in the developers facebook and had worked before. I tried to put this hash in the developers.facebook but does not work too.
After hours of research:
deleted the app in Facebook developers
remove cordova plugin from ionic project
Delete the file debug.keystore under C:\Users\yourUserName.android
Generate a new key with "keytools"
Create a new app on developers.facebook.com and add the new hash key
Then it started to work again.
But now, its showing me the same "invalid hash key" again :(
Any help?
Edited:
I deleted just the debug.keystore and ran "ionic run android".
Then showed me the same error but with a new hash key,
I tryeid again to put the hash key that they show in the error message and it is working now. But it´s very strange, because the hash key that I generated with "keytools" and put in developer.facebook for the first time, was just for nothing.
I follow this tutorial: https://ionicthemes.com/tutorials/about/native-facebook-login-with-ionic-framework
Download APK (your_apk_name.apk)
Run Command keytool -list -printcert -jarfile your_apk_name.apk
Copy the SHA1 value
Go to http://tomeko.net/online_tools/hex_to_base64.php
paste SHA1 value & hit convert.
Copy the output(base64) and use this as your facebook hash.
You need to add all key hashes that you see in those error messages to the setting of your Facebook app. Go to developers.facebook.com/yourappid, to settings > basic, scroll down to key hashes and add it there. We've got 4 different hashes for ours now and I'm sure they'll be more going forward.
It seems that having other applications on the users phone that are using Facebook login can change the hash needed by your app in login. So like, if you've got the main Facebook app on your phone, it'll require a different hash for your app's login than if you have just Facebook Messenger. This is our working theory that holds up against all evidence so far.
I'd recommend setting up a logger for client errors so you can get those hashes as they pop up. This obviously isn't the ideal solution so I'd love to hear what others find out about this but, for now at least, it's working.
Im developing an app with ionic framework and im using Backand as BaaS, im using the sign in with social accounts service that provides me, but when im trying to sign in with facebook, return this error.
The user is not signed up to 'name-of-my-app'.(signing in with facebook).
And when im trying to sign in with google, return this error:
Object reference is not set to an instance of an object.
Also im create my own apps in facebook and google and i set the AppId and AppSecret to Backand.
I dont know why im receiving this error, actually im ussing almost the same code that the starter's Backand provides.
I have met this kind of error "Object reference is not set to an instance of an object" too, after pressing "Validate & Update" button, after editing database json model several times in the backand control panel. I could save the new model and continue, but that red error was appearing on top right at each save. My hypothesis is that also in your case the issue is related to a bug in the database model editor. I personally got rid of that kind of error by deleting the project (I had no data in it yet) and creating a new one, re-pasting and saving all at once the exact same database model json I created in the previous project.
So, I wanted to create a new social media app using Swift and Parse. When I go to the Parse site, and click on dashboard, it gives me a login screen. I don't have an account, so I click on the "I don't have a parse account" button. When I click on that, it just takes me back to the home page. I did manage to get the code and frameworks and stuff that I needed from the docs, but that didn't quite work. It gave me this for the initialize code:
let configuration = ParseClientConfiguration {
$0.applicationId = "YOUR_APP_ID"
$0.server = "http://YOUR_PARSE_SERVER:1337/parse"
}
In the tutorial I'm watching, rather than "YOUR_APP_ID" and "http://YOUR_PARSE_SERVER:1337/parse" it just had a bunch of letters and numbers, which I would assume are the app ID and Parse server. My guess is, that I need an account to get those. Would that be correct? And, does anyone know why I can't seem to get an account? Thanks.
Parse.com is shutting down, so that's why you are not allowed to create new accounts on the service. Check the blog post.
They open sourced a nodeJS implementation, which you should definitely check out at link, and here is an example to get you started. You can easily use the deploy buttons to host the server on services like Heroku, AWS, Azure, etc. You can also deploy a server locally, for testing purposes.
Although it's true that Parse is discontinuing early next year, you can still setup a new app if you want to use the service for a shorter term project. Replace your code with the following.
Parse.setApplicationId("YOUR-APP-ID", clientKey: "YOUR-CLIENT-ID")
You can find your App ID and Client ID in your app's settings > security & keys.
EDIT: You definitely need an account for this to work.
When i try to delete the user like it says in the docs (http://developers.facebook.com/docs/test_users/#deleting) i get the error response :
(#2903) Cannot delete this test account because it is associated with other applications. Use DELETE app_id/accounts/test-users/test_account_id to remove it from other apps first. Use GET test_user_id/ownerapps to get complete list of owner apps.
then when i try to do what it says (replacing <user_id> and <app_id> with a facebook numeric id) :
DELETE <app_id>/accounts/test-users/<user_id> to remove it from other apps first
i get this error :
Unknown path components: /<user_id>
am i missing something ?
As the error said you cannot delete an user because it has been assigned to two or more application.
The workaround for this is to get all the applications which are using this specific user using this call
"https://graph.facebook.com/TEST_ACCOUNT_ID/ownerapps&access_token=YOUR_APP_ACCESS_TOKEN"
This will give you the list of app the test account is attached to prior decoding the object with a JSON serializer. Then you can remove and not delete the test account from each app until only one remains using :
"https://graph.facebook.com/APP_ID/accounts/test-users?uid=TEST_ACCOUNT_ID&access_token=APPLICATION_ACCESS_TOKEN&method=delete"
When only one app remains you can delete the test account using :
"https://graph.facebook.com/TEST_ACCOUNT_ID?method=delete&access_token=TEST_ACCOUNT_ACCESS_TOKEN"
Hope this help!
I'm trying to build a feature into my framework wrapper that automates registering template bundles. I've gotten to the point where it seems like I can do so successfully using the Feed.registerTemplateBundle API method - I don't get an error, and I do get a template id back. However, the template doesn't show up in the "Registered Templates Console", and if I try to publish a story using the id, it gives me an "invalid template bundle id" error.
Any suggestions?
I had this problem in Facebook's official example application (TheRunAround)
it was registering template but when it tried to get an id it was
using sprintf (like: sprintf('%d', ))
current template ID's are out of the 32bit range so it was returning wrong id.
May it be the cause?
Turns out there were two problems:
I was erroneously double-json-encoding the short story template
Facebook was accepting the erroneously-formatting calls and returning an id, thus resulting in the creation of "phantom" template bundles that weren't showing up in their console.
I've fixed my code, and the bug has been reported (and I believe since fixed).