Building Social 
Tools 
Socal Code camp - 2014
Social Tools 
• Action Oriented 
• Data Driven 
• Rapid Feedback
Social Tools Suite 
Reviews 
Aggregation 
Reputation 
Monitoring 
Content Discovery Content Publishing 
Realtime Feeds Analytics
Reviews Aggregation
Reviews Aggregation 
• Customer Reviews from Review Sites 
o Yelp, Edmunds, Facebook etc. 
o Metrics 
• Overall Rating 
• Reviews 
• Star Rating 
• Aggregation Models 
o API 
o Raw Webpage Analysis
Reviews Aggregation - API 
YelpTemplate yelp = new YelpTemplate( 
'yelp.consumerKey’, 'yelp.consumerSecret’, 
'yelp.token’,'yelp.tokenSecret') 
Business business = yelp.findById(‘bizId’) 
def overallRating = business.rating 
def reviews = business.reviews 
Setup: 
1.Pre-negotiated security tokens 
2.Rate limits
Reviews Aggregation - Toolkit 
o Web Based Extraction Tools 
• Import.IO ( http://import.io) 
oConvert web pages to table data. 
oLittle or No Coding
Reputation Monitoring
Reputation Monitoring 
• “Understanding or Influencing of an Individual’s or 
Business’s Reputation. “ 
• Look for Unstructured Information online. 
• Sentiment Analysis. 
• Sentiment Analysis – Computationally Identify and 
Categorize Opinion in a Piece of Text
Reputation Monitoring 
• Employ Techniques to find Information Online 
o Web Crawlers 
o RSS 
o Social Media Data
Web Crawling 
• 80legs.com , Scrapy.org etc. 
• Provide crawlable sites, depth, and # of results to 
return. 
• Plugins to filter returned html 
Create: 
POST https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME} 
Status: 
GET https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME} 
Results: 
GET https://api_token:@api.80legs.com/v2/results/{CRAWL_NAME}
Other Sources 
• RSS: 
o API for RSS/Atom Feeds 
o Rome/ Apache Abdera 
URL feedUrl = new URL(url); 
SyndFeed feed = fetcher.retreiveFeed(url) 
doStuff(feed.articles)
Other Sources 
• Social Mentions 
POST 
http://api2.socialmention.com/search?q=“socalcodecamp”&f=json& 
t=all&lang=en&apiKey=123dhdh7
Sentiment Analysis 
• Why  Lots of Opinions on the web 
• Machine Learning/ Lexicon Based 
Machine Learning Based 
• Collect Data 
• Label Data 
• Prepare and Upload Data 
• Predict new Data 
• Iterate 
Lexicon based 
• Tokenize Words, 
• Lematize Them ( good  gud .. ) 
• Assign negators/ intensifiers
Sentiment Analysis - Tools 
• Google Predictions API 
• Stanford NLP 
• Init training set 
• For each sentence 
o Break into words 
o Pass each word/phrase into training set to classify sentiment 
o Combine each classified word and sentiment to compute overall 
sentiment.
Content Discovery
Content Discovery 
• Discover Relevant Content 
• Purpose : To Engage more audience and attract 
Leads 
• Different Channels 
o RSS 
o Social Trends – Youtube , Twitter, Topsy… 
• Youtube Trends API 
• Twitter Trends API 
o Local News Feeds 
o Custom APIs
Trends API 
• GET https://api.twitter.com/1.1/trends/place.json?id=1
Content Publishing 
• Publishing Interesting Content to engage Users 
• Oauth Permission to Act on Client’s behalf 
o Provides Client Applications a ‘Secure’ Access to Server Resources on Behalf of a 
resource Owner 
• Publish to Multiple Channels at once. 
Twitter4j twit4j = Twitterfactory.getInstance() 
twit4j.setAuthorizationCode(…..) 
Tweet createdTweet = twit4j.post(“status Update”) 
FacebookClient client = new FacebookClient(); 
client.publish(“Message”, wallId);
• Most Popular 
o Facebook, Twitter, LinkedIn, Pinterest… 
• Twitter Post
Realtime Notifications 
• Notifications on your social media Actions 
• Techniques 
o HTTP Push 
o Persistent Connections 
• JVM Libraries Available 
o Twitter4j, HTTP APIs, Native Java APIs 
• Try Twitter
Analytics/Insights 
• Provider APIs 
o Facebook Insights API 
• /{page-id}/insights 
• /{post-id}/insights 
o Twitter Analytics 
• Analytics.twitter.com 
o Impressions, engagement rate 
o Interests, locations etc. 
• Thirdparty Providers – 
o Gnip , Datasift 
o Topsy Labs
Other Products 
• Hootsuite 
• Sprout Social 
• Buffer

Building Social Tools

  • 1.
    Building Social Tools Socal Code camp - 2014
  • 2.
    Social Tools •Action Oriented • Data Driven • Rapid Feedback
  • 3.
    Social Tools Suite Reviews Aggregation Reputation Monitoring Content Discovery Content Publishing Realtime Feeds Analytics
  • 4.
  • 5.
    Reviews Aggregation •Customer Reviews from Review Sites o Yelp, Edmunds, Facebook etc. o Metrics • Overall Rating • Reviews • Star Rating • Aggregation Models o API o Raw Webpage Analysis
  • 6.
    Reviews Aggregation -API YelpTemplate yelp = new YelpTemplate( 'yelp.consumerKey’, 'yelp.consumerSecret’, 'yelp.token’,'yelp.tokenSecret') Business business = yelp.findById(‘bizId’) def overallRating = business.rating def reviews = business.reviews Setup: 1.Pre-negotiated security tokens 2.Rate limits
  • 7.
    Reviews Aggregation -Toolkit o Web Based Extraction Tools • Import.IO ( http://import.io) oConvert web pages to table data. oLittle or No Coding
  • 8.
  • 9.
    Reputation Monitoring •“Understanding or Influencing of an Individual’s or Business’s Reputation. “ • Look for Unstructured Information online. • Sentiment Analysis. • Sentiment Analysis – Computationally Identify and Categorize Opinion in a Piece of Text
  • 10.
    Reputation Monitoring •Employ Techniques to find Information Online o Web Crawlers o RSS o Social Media Data
  • 11.
    Web Crawling •80legs.com , Scrapy.org etc. • Provide crawlable sites, depth, and # of results to return. • Plugins to filter returned html Create: POST https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME} Status: GET https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME} Results: GET https://api_token:@api.80legs.com/v2/results/{CRAWL_NAME}
  • 12.
    Other Sources •RSS: o API for RSS/Atom Feeds o Rome/ Apache Abdera URL feedUrl = new URL(url); SyndFeed feed = fetcher.retreiveFeed(url) doStuff(feed.articles)
  • 13.
    Other Sources •Social Mentions POST http://api2.socialmention.com/search?q=“socalcodecamp”&f=json& t=all&lang=en&apiKey=123dhdh7
  • 14.
    Sentiment Analysis •Why  Lots of Opinions on the web • Machine Learning/ Lexicon Based Machine Learning Based • Collect Data • Label Data • Prepare and Upload Data • Predict new Data • Iterate Lexicon based • Tokenize Words, • Lematize Them ( good  gud .. ) • Assign negators/ intensifiers
  • 15.
    Sentiment Analysis -Tools • Google Predictions API • Stanford NLP • Init training set • For each sentence o Break into words o Pass each word/phrase into training set to classify sentiment o Combine each classified word and sentiment to compute overall sentiment.
  • 16.
  • 17.
    Content Discovery •Discover Relevant Content • Purpose : To Engage more audience and attract Leads • Different Channels o RSS o Social Trends – Youtube , Twitter, Topsy… • Youtube Trends API • Twitter Trends API o Local News Feeds o Custom APIs
  • 18.
    Trends API •GET https://api.twitter.com/1.1/trends/place.json?id=1
  • 19.
    Content Publishing •Publishing Interesting Content to engage Users • Oauth Permission to Act on Client’s behalf o Provides Client Applications a ‘Secure’ Access to Server Resources on Behalf of a resource Owner • Publish to Multiple Channels at once. Twitter4j twit4j = Twitterfactory.getInstance() twit4j.setAuthorizationCode(…..) Tweet createdTweet = twit4j.post(“status Update”) FacebookClient client = new FacebookClient(); client.publish(“Message”, wallId);
  • 20.
    • Most Popular o Facebook, Twitter, LinkedIn, Pinterest… • Twitter Post
  • 21.
    Realtime Notifications •Notifications on your social media Actions • Techniques o HTTP Push o Persistent Connections • JVM Libraries Available o Twitter4j, HTTP APIs, Native Java APIs • Try Twitter
  • 22.
    Analytics/Insights • ProviderAPIs o Facebook Insights API • /{page-id}/insights • /{post-id}/insights o Twitter Analytics • Analytics.twitter.com o Impressions, engagement rate o Interests, locations etc. • Thirdparty Providers – o Gnip , Datasift o Topsy Labs
  • 23.
    Other Products •Hootsuite • Sprout Social • Buffer

Editor's Notes

  • #6 http://www.yelp.com/biz/starbucks-el-segundo
  • #8 http://www.edmunds.com/dealerships/California/ManhattanBeach/ManhattanBeachToyotaScion_2/sales.4.html?sorttype=createdate-desc
  • #10 Demo pages or throw in some points
  • #11 https://apps.dealer.com/social/as/precisionacuraofprincetonadw/precisionacuraofprincetonadw-admin/content/browse
  • #14 http://api2.socialmention.com/search?q=%E2%80%9Csocalcodecamp%E2%80%9D&f=json&t=all&lang=en&apiKey=123dhdh7
  • #15 Examples, and Demos for each
  • #16 http://text-processing.com/demo/sentiment/ http://nlp.stanford.edu:8080/sentiment/rntnDemo.html
  • #20 https://apps.dealer.com/social/as/ddcdemobmw/ddcdemobmw-admin/socialSyndication/index/facebook?disconnect=Disconnect
  • #22 https://dev.twitter.com/oauth/tools/signature-generator/6648800?nid=812