parse-platform

Java - Parse - iterate over ParseObject fields

荒凉一梦 提交于 2020-06-09 06:25:31
问题 Having a ParseObject object how can I loop through its fields and get the name of the field along with the value of it? This would really help me minimize my code. 回答1: Hmm, ParseObject contains key-value pairs, and I think you can't iterate though it. But. I found something called .keySet() method of ParseObject. It returns ... well, the set of keys (excluding createdAt, updatedAt, authData, or objectId). I think you can convert it into an array and iterate trhough it? Something like this:

Twilio - The From phone number xxx is not a valid, SMS-capable inbound phone

和自甴很熟 提交于 2020-04-30 05:35:45
问题 I want to use Twilio for verifying phone number of users registering on my app. As a backend, I have Parse. I tried to send an SMS using the test credentials, so far I received a success message, but, I didn't received the SMS! I've tried to switch to the live credentials; however, I received the following: { "code": 141, "error": { "status": 400, "message": "The From phone number +12025550162 is not a valid, SMS-capable inbound phone number or short code for your account.", "code": 21606,

Twilio - The From phone number xxx is not a valid, SMS-capable inbound phone

爱⌒轻易说出口 提交于 2020-04-30 05:35:05
问题 I want to use Twilio for verifying phone number of users registering on my app. As a backend, I have Parse. I tried to send an SMS using the test credentials, so far I received a success message, but, I didn't received the SMS! I've tried to switch to the live credentials; however, I received the following: { "code": 141, "error": { "status": 400, "message": "The From phone number +12025550162 is not a valid, SMS-capable inbound phone number or short code for your account.", "code": 21606,

How to fix “Error: XMLHttpRequest failed” on React Native with Parse-Server backend

妖精的绣舞 提交于 2020-03-25 13:42:36
问题 Today I have a plan to convert an iOS app (Swift) and Android (Java+Kotlin) to React Native . This app show hospital as Marker on (Google)Maps based on user location. My backend is Parser-Server (now is ParsePlatform ) The function bellow query the data (class) from Parse backend: async getHospitalNearbyUser() { const { userLocation, region } = this.state if ((userLocation.lat !== null) && (userLocation.lng !== null)) { const lng = userLocation.lng const lat = userLocation.lat const radius =

Parse.com update user Cloud Code giving error 206: cannot modify user

怎甘沉沦 提交于 2020-03-05 04:50:07
问题 I am trying to write a simple Cloud Code function on Parse Server that updates a user's paramater. My function is as follows: Parse.Cloud.define("updateUser", function(request, response) { var query = new Parse.Query("User"); query.equalTo("username", request.params.username); var type = request.params.type; query.first({ success: function (user) { user.set("userType", type); user.save(null, { success: function (object) { response.success("SUCCESS"); }, error: function (object, error) {

Parse.com update user Cloud Code giving error 206: cannot modify user

萝らか妹 提交于 2020-03-05 04:50:07
问题 I am trying to write a simple Cloud Code function on Parse Server that updates a user's paramater. My function is as follows: Parse.Cloud.define("updateUser", function(request, response) { var query = new Parse.Query("User"); query.equalTo("username", request.params.username); var type = request.params.type; query.first({ success: function (user) { user.set("userType", type); user.save(null, { success: function (object) { response.success("SUCCESS"); }, error: function (object, error) {

How import device token into Firebase? I have JSON from parse.com

浪尽此生 提交于 2020-02-25 04:16:57
问题 I'm trying to switch the push message service. The new push service is Firebase. I have JSON with tokens from parse.com, but can't find how to import it in Firebase. 回答1: I'm pretty sure you can't just import the tokens used by parse.com to Firebase Cloud Messaging for use. What should be done is to register your client app users to FCM by adding it to your app. More details can be found in the Migrate your Parse Android App to Firebase (or if you're using iOS) docs: Suggested Migration

Store credit card using Stripe + Parse with cloud code

余生颓废 提交于 2020-02-21 06:53:23
问题 I am attempting to store a users credit card into stripe. Once the token is made, I attempt to save the token with the user to Stripe as a customer. But I didnt find any answer to my problem, I just need to store a card to a user that already exist. I tried to use the method Stripe.Customers.update but it store the new card removing the "default" card if the user had one. And using the method Stripe.Customers.create it create a new customer with the new card, but I need to store in specific

Facebook / Parse Login behaving strange: The proxied app is not already installed

喜欢而已 提交于 2020-02-20 11:09:41
问题 I am going nuts with this! Although, the solutions out there did help me, they did not fix my problem. I am adding Facebook login to my current app. The kicker is, I have a few apps that already have this feature. I had no problem adding it to them! I have looked at the code of those apps, and this code I am working on now is identical. The only difference I can think of is this app was out on the market then received a Facebook login feature. But, I can't imagine that would matter... Code:

XMLHttpRequest failed on App

南笙酒味 提交于 2020-02-14 07:57:46
问题 I'm trying to run a simple singup example on my mobile app using Ionic framework and Parse.com. The code is simple as follows: Parse.initialize(APP_KEY, JS_KEY); Parse.User.signUp("my.user", "123456", {}, { success: function(user) { // Hooray! Let them use the app now. console.log('yuhuuu ' + user) }, error: function(user, error) { // Show the error message somewhere and let the user try again. alert("Error: " + error.code + " " + error.message); } }); This code works when I test it on my