Hi .
How do i send the header information like headers for authorization...I tried sending it in header={"Authorization " : "......"} format ...but i am recieving errors...Should i be sending in key value pair itself or does Oauth require some other format.... I have also seen some others having the same problem...but with paypal api...
And also I have tried to write the ajax request as i did'nt know the inner mechanism of the rbv_api calls....But jt has difficulty requesting(GET,POST) apis for security reasons.. No 'Access-Control-Allow-Origin' is the errror if i am using manual javscript rather than using rbv_api calls....
Please help me with the rbv_api calls or the manual ajax calls
My code
var url="https://api.twitter.com/1.1/statuses/update.json";
var params={"status":"Hiii"};
var key="OAuth oauth_consumer_key=/"ydpaKblD5OKK3kW2TRuscej1P/", oauth_nonce=/"539c9b13e0e76f4bfdb4f1c462ff97d7/", oauth_signature=/"oaOSVDDvx3EfUPRCunZU%2FHkqir0%3D/", oauth_signature_method=/"HMAC-SHA1/", oauth_timestamp=/"1402394771/", oauth_token=/"581185549-BeGt5lT3dIFSHHD9vll4tYkazpPgpGaj1Fixl3ki/", oauth_version=/"1.0/" ";
var headers={
"content-Length":params.length,
"content-Type":"jsonp",
"Connection":"close"
"Authorization":key
};
var body=rbv_api.sendHttpPost(url,params,headers);
rbv_api.setSharedValue("response",body);
var json=rbv_api.stringToJson(body);
return body;
Plss help :)
var headers = { ‘header_name1’ : ‘header_val1’, ‘header_name2’ : ‘header_val2’ }
Hi .
How do i send the header information like
Authorization: OAuth oauth_consumer_key="ydpaKblD5OKK3kW2TRuscej1P", oauth_nonce="7b4b93e333638f075579f7665bb3a3b2", oauth_signature="O9p9WxPW5cSfPmpam8RC8W5M0C0%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1402218095", oauth_token="581185549-BeGt5lT3dIFSHHD9vll4tYkazpPgpGaj1Fixl3ki", oauth_version="1.0"
I tried sending it in header={"Authorization " : "......"} format ...but i am recieving errors...Should i be sending in key valu epair itself or does Oauth require some other format....
My code
var url="https://api.twitter.com/1.1/statuses/update.json";
var params={"status":"Hiiiiii"};
var headers={"Authorization":"OAuth oauth_consumer_key="ydpaKblD5OKK3kW2TRuscej1P", oauth_nonce="7b4b93e333638f075579f7665bb3a3b2", oauth_signature="O9p9WxPW5cSfPmpam8RC8W5M0C0%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1402218095", oauth_token="581185549-BeGt5lT3dIFSHHD9vll4tYkazpPgpGaj1Fixl3ki", oauth_version="1.0" "};
var body=rbv_api.sendHttpPost(url,params,headers);
Plss help :)
Flag this post as spam/abuse.
Hi,
Thanks for the reply..But the last param "chunked =false" is also not helping...
I am getting the error " HTTP call failed: Bad Request "
Does the rbv_api.sendhttpPost call support CORS("Cross-origin resource sharing") ?? becuase that was the error i was getting when i wrote manual ajax script (I got the error "No access control origin")
Hello Kobe_mamba,
just wanted to inform you that I'm actively looking into a solution. First of all, have you successfully been able to use the Twitter API externally? Knowing so will help to determine whether the issue is more related to Rollbase or not.
Unfortunately, javascript is limited by the same-origin policy which explains the error message you received ("No access control origin"). CORS support requires the particular header (Access-Control-Allow-Origin) to be mentioned for both clients and servers. At this point it seems that Twitter does not provide CORS support.
Thanks,
Corey Prak