This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Call our Cloud Function that sends an SMS with Twilio | |
[PFCloud callFunctionInBackground:@"inviteWithTwilio" | |
withParameters:@{ number : phoneNumber } | |
block:^(id object, NSError *error) { | |
[[[UIAlertView alloc] initWithTitle:@"Invite Sent!" | |
message:@"Your SMS invitation has been sent!"; | |
delegate:nil | |
cancelButtonTitle:@"Ok" | |
otherButtonTitles:nil, nil] show]; | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Require the SendGrid Cloud Module | |
var sendgrid = require("sendgrid"); | |
sendgrid.initialize("[email protected]", "your_password"); | |
// Run this Cloud Function every time a new Activity (such as a comment) | |
// is saved | |
Parse.Cloud.afterSave("Activity", function(request, response) { | |
// Check if the activity type is a comment | |
var activity = request.object; | |
if (activity.get("type") === "comment") { |