Here is a short post in retrieving information from the Google+ API using R, and then analysing it.
To create an API key:
- Go to the Google Developers Console.
- Create or select a project.
- In the sidebar on the left, select APIs & auth.
- In the displayed list of APIs, find the Google+ API and set its status to ON.
- In the sidebar on the left, select Credentials.
- Create an API key by clicking Create New Key. Select the appropriate kind of key: Server key Then clickCreate.
from- https://developers.google.com/+/api/oauth
and the R code
#install.packages("plusser") library(plusser) help(plusser) library(RCurl) options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))) setAPIkey('AIzaSyBtYqDsAtzp4FOS7FGbrc_n6mD-uJIOvcQ') myProfile=harvestProfile("+AjayOhri", parseFun = parseProfile) str(myProfile) myposts=harvestPage("+AjayOhri", parseFun = parsePost, results = 1, nextToken = NULL, cr = 1) str(myposts) head(myposts) plot(myposts$ti,myposts$nC) #number of comments plot(myposts$ti,myposts$nP) #number of likes or plus 1 plot(myposts$ti,myposts$nR) #number of reshares some screenshots and images![]()
You can also see the Rpubs document here http://rpubs.com/decisionstats2/plusser Now you can do text analysis and sentiment analysis on myposts$msg and do social media analysis on what makes people like what kind of content. For better results, use a google plus id (page or person) which has a lot of PUBLIC posts!