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
SteveClSteveCl 

REST API pure javascript solution

Hi,

This is my first project with SalesForce and what I need to be able to do is (if possible) have a totally javascript (client side) "widget" to display a users chatter feed.

 

I've seen a few examples of a JS only solution for OAuth, but there are no examples on SalesForce for this and any I have found use server side code to handle authentication.  THe examples are the Yahoo and Google framework, but I'm not sure they will work...

 

I am working within a sandbox (Office 365, SharePoint online) on the server and cannot make web requests to other domain - as far as I am aware.

 

Any thoughts on this?

bhuyadavbhuyadav

Achieving Rest API to work purely through Javascript is not that straight forward.

 

Cross-Site scripting always come accross. As far as I know "JSON-P" was the way Facebook resolve the cross-site scripting issue.

 

However for salesforce you might need to create a Proxy page which is written in servier side language to address cross site scripting issue.