+ Start a Discussion
revathyrevathy 

Salesforce to twitter integration connection problems? i am getting errors in BAD request

HttpRequest req2 = new HttpRequest();
req2.setEndpoint('https://api.twitter.com/1.1/search/tweets.json?q=Redigo');
req2.setMethod('GET');
String access_token = '209178935-GmPOB96pKNYOV090I8ke4DM5M8gzxr9AzezG6eZH';
String authorizationHeader = 'Bearer ' + access_token;
//req2.setHeader('Bearer ' + access_token);
req2.setHeader('Authorization', authorizationHeader);
Http http = new Http();
HTTPResponse res = http.send(req2);
String sBody = res.getBody();
system.debug('@@'+ sBody);

please me some urgent