3

I am trying to access the Chatter API from JavaScript that is running on localhost (and will eventually be hosted somewhere). If I try a normal AJAX GET request, I get the Access-Control-Allow-Origin error.

I have tried the Salesforce AJAX toolkit but it seems that needs to be run from a Force.com domain. I cannot use JSONP because the Chatter API only returns JSON.

Does anyone know of a common workaround for my situation? Something equivalent to the LinkedIn JavaScript API for example?

ashwin103
  • 31
  • 4

1 Answers1

0

You could use jsforce and also you need to setup a proxy to fix the CORS problem.

Cloxure
  • 1,799
  • 1
  • 14
  • 15