1.4.0 • Published 8 years ago

social-data v1.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

social-data

Introduction:

Get meta-data for a URL from the most popular social networks

.facebook(url, callback)

Get social sharing data from Facebook

Arguments

  • url - The URL you want data for.
  • callback(err, result) - Callback to be called with the resulting data or an error.

Example

var http = require('http');

var socialData = require('social-data')({
  agent: (new http.Agent()) // optional agent/pool
});

var url = 'http://www.vg.no/'

socialData.facebook(url, function(err, result) {
  if (!err) {
    // social shares data from facebook as result
  }
})

.twitter(url, callback) (deprecated)

NOTE: Twitter no longer supplies this functionality (sadly..)

.linkedin(url, callback)

Get social sharing data from LinkedIn

Arguments

  • url - The URL you want data for.
  • callback(err, result) - Callback to be called with the resulting data or an error.

Example

var http = require('http');

var socialData = require('social-data')({
  agent: (new http.Agent()) // optional agent/pool
});

var url = 'http://www.vg.no/'

socialData.linkedin(url, function(err, result) {
  if (!err) {
    // social shares data from facebook as result
  }
})
1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.0.0

9 years ago