+ Start a Discussion
Kam.ax1015Kam.ax1015 

Integrating wtih a web site hosted in Heroku

Hello,

 

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.

 

 

Thanks,

Kam

cloudcodercloudcoder

Check out the following sample app, http://chatter-sales.heroku.com. This does exactly what you are looking at. Behind the scenes, it connects to force.com with an 'integration' user called "Question"

Kam.ax1015Kam.ax1015

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 http://chatter-sales.heroku.com/ but we have a public facing  web site which is on tomcat.

 

 

Thanks a lot.

LoganLogan

Kam

 

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.

 

logan

 

 

 

 

cloudcodercloudcoder

Check out the Getting Started with the REST API article (http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_REST_API) 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.