• Artyom Grigor
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

Hello!

I've application. I can login and update status through sObject.

I want update status for few users from my app by changing their UserId.

var user = new sObject {Id = _service.getUserInfo().userId, type = "User"};

But I have error when I put something like this:

//var user = new sObject {Id = "005A0000001r4j4IAA", type = "User"};

 

Could you please help me, how can I do this? Or each user has to login first? So if I know all UserIds for my organization I couldn't use it? And as a result I can't develop service-to-service integration?

Thanks!

 

Hello,

I try to use a OAuth 2 in html with jquery in following way:

 

URL=https://login.salesforce.com/services/oauth2/token

 

/*$.ajax({
 type: "POST",
 url: "<URL>",
 data: "client_id="+escape(clientId)
+"&client_secret="+escape(client_secret)
+"&grant_type=password"
+"&username="+escape('artyomgrigor@gmail.com')
+"&password="+escape('<THE COMBINATION OF YOUR PASSWORD AND TOKEN>'),
 success: function(data, textStatus, jqXHR){
 alert( "Data Saved: " + textStatus );
 }
 });*/
In response I'll get nothing!!! Just 200 OK code.
Could you help me?

 

Hello,

I've read a lot of docs but don't understand how can I use a REST API into Opensocial gadget. As I understood I must get a token for API by two ways:

1) Log in in Force.com and redirect than to my app. However I can't do that because my app is a gadget and I can't handle a response

2) I can't use grant_type=password because user doesn't know his security token.

 

Could you help me or give some advise? I really don't know how to deal with this problem.

 

Thanks.

Hello,

I try to use a OAuth 2 in html with jquery in following way:

 

URL=https://login.salesforce.com/services/oauth2/token

 

/*$.ajax({
 type: "POST",
 url: "<URL>",
 data: "client_id="+escape(clientId)
+"&client_secret="+escape(client_secret)
+"&grant_type=password"
+"&username="+escape('artyomgrigor@gmail.com')
+"&password="+escape('<THE COMBINATION OF YOUR PASSWORD AND TOKEN>'),
 success: function(data, textStatus, jqXHR){
 alert( "Data Saved: " + textStatus );
 }
 });*/
In response I'll get nothing!!! Just 200 OK code.
Could you help me?