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

Integrating wtih a web site hosted in Heroku



If I want to expose chatter feed of products on public web site which is going to be hosted on Heroku. How would the oAuth work? Obviously people arounf the world are not going to login to Salesforce to get authentication token.






Check out the following sample app, This does exactly what you are looking at. Behind the scenes, it connects to with an 'integration' user called "Question"


Since I do not know Ruby it is hard to follow. Is there a sample to do the same from external Java web site? Basically use case is same as but we have a public facing  web site which is on tomcat.



Thanks a lot.




I'm the author of that Ruby demo app.  We don't have a Java example at the moment, but the Ruby is readable if I point out where to look.  The Oauth related code is under app/controllers/session_controller.rb and app/models/session.rb.


There is a proxy user called "Question" inside the Salesforce org thats proxying in requests from external users.  This user is also used to pull the feeds out of Salesforce and display them. Once that user acquires an access token, the api calls are made in app/models/qa.rb


Let me know if you have further questions.








Check out the Getting Started with the REST API article ( This includes a complete Java example running on tomcat (using JSP 3.0 spec). Whilst it is not Chatter REST API specific, the concepts are the same, you would just need to use the Chatter REST API resources.