I am trying to use the Viral Heat API in R for sentiment analysis. Directly hitting the browser with URL is returning proper results. http://www.viralheat.com/api/sentiment/review.json?text=i am happy&api_key=
Result: {"prob":0.6652067715019936,"mood":"positive","text":"i am happy"}
But when running from R, it is returning NULL
R code:
vh_answer = getURL("http://www.viralheat.com/api/sentiment/review.json?text=i%20am%20happy&api_key=<my key>")
What is the reason? Can anyone help please?