function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vishesh91vishesh91 

post to chatter from javascript

I want to post to chatter from javascript.the app I m creating is a browser extension,so its not specific to a particular domain.on clicking on a button,javascript does the oAuth dance ,and posts to chatter.is it possible,as in will it  not be affected by the same origin policy.

 

can you post some links,from where I can start and provide some guidance.

 

Thanks

ChrisOctagonChrisOctagon

You should be able to post using the Chatter REST API, however you may run into the single origin policy unless you use Salesforce's built-in Ajax proxy.

 

Info on the Chatter REST API and demo components:

http://wiki.developerforce.com/page/Chatter_API

 

Doc:

http://www.salesforce.com/us/developer/docs/chatterapi/index.htm

 

Winter 13 prerelease doc:

http://www.salesforce.com/us/developer/docs/chatterapipre/index.htm

 

Info on the Ajax proxy:

http://www.salesforce.com/us/developer/docs/ajax/Content/sforce_api_ajax_queryresultiterator.htm