Getting following error when trying the twitter connector.
error: wso2.twitter:TwitterError, message: bad Authentication data.
at tweet.doTweet(MyTwitterService.bal:31)
Following is my code
doTweet(endpoint caller, http:Request request){
string message = check request.getTextPayload();
twitter:Status st = check twitter->tweet(message,"","");
http:Response response = new;
response.setTextPayload("ID "+ <string>st.id + " \n");
_=caller->respond(response);
}
What could be the issue?
Double checked about the credentials and they are correct.
Just following https://ballerina.io/learn/quick-tour/
Shammi, I did follow the guidance[1]and was working fine. Anyway, please do enable trace logs from ballerina and verify the trace information. I guess it should due to credentials or bad token. You may use [2] to enable trace logs.
[1] Ballerina: Twitter Connector : error: wso2.twitter:TwitterError, message: bad Authentication data [2] https://ballerina.io/learn/by-example/http-trace-logs.html