Created
September 5, 2012 20:35
-
-
Save sbob-sfdc/3644304 to your computer and use it in GitHub Desktop.
Workshop 303, Tutorial 3, Step 4.1
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
// add select Chatter functions to forcetk | |
// get feed-items | |
forcetk.Client.prototype.chatterFeed = function(id, callback, error) { | |
this.ajax('/' + this.apiVersion + '/chatter/feeds/record/' + id + '/feed-items', callback, error); | |
} | |
// post feed item | |
forcetk.Client.prototype.postChatterItem = function(id, text, callback, error) { | |
this.ajax('/' + this.apiVersion + '/chatter/feeds/record/' + id + '/feed-items', callback, error, "POST", '{ "body" : { "messageSegments" : [ { "type": "Text", "text" : "' + text + '" } ] } }'); | |
} | |
// post feed comment | |
forcetk.Client.prototype.postChatterComment = function(id, text, callback, error) { | |
this.ajax('/' + this.apiVersion + '/chatter/feed-items/' + id + '/comments', callback, error, "POST", '{ "body" : { "messageSegments" : [ { "type": "Text", "text" : "' + text + '" } ] } }'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment