social_shares 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fb7315acc49822df580034d6b28e977ac736b51
4
- data.tar.gz: c1611ab598f7cd3aa3a27a87d94270cdf4630d53
3
+ metadata.gz: a746652fc7359c73e9f10aca8c6dd097ff7fc7a1
4
+ data.tar.gz: 4b21b5c56dcf8f46eedc336d685092ce86847a59
5
5
  SHA512:
6
- metadata.gz: 53b32f2224f66b8906feabec2952855ad9a622a04f3e10c4c41539c24d9ef89ad81a74f389ddcbb3e00d49104081533ece9fe9e21b6f555d1fa0248bff700bc8
7
- data.tar.gz: 2911b2b3e33ccb8ea8290fe5068281b4641680df135910593f631d7c1b8d42d23431318818696fe45865b308fba648e37557ce08cbe1306397be2cf07b56565f
6
+ metadata.gz: eb2d7b8e536dc714235a46ec871346279543fd33645144c7b4117237d8b0e5314f147c51209c1ed6c683ea0e59e4318304d91d8acba9aa052e816c9ff8b9519b
7
+ data.tar.gz: be4340ccf79e4938f1855f237657d82417e5cfa2eb864c4e42871dea74bde955c50d3c2b413f78a40037c43a2906561b4772205cd94dd7346247e5904eb11e0c
data/README.md CHANGED
@@ -5,6 +5,8 @@ Social Shares
5
5
 
6
6
  Social shares is intended to easily check social sharings of an url.
7
7
 
8
+ You can track how many times the url was shared in various social networks, such as facebook, twitter, etc. It can be useful for some kind landings with social mechanics or for tracking network activity of your content pages.
9
+
8
10
  Supported networks
9
11
  ------
10
12
  International:
@@ -135,4 +137,4 @@ SUPPORTED_NETWORKS = [:foo, :vkontakte, :facebook]
135
137
 
136
138
  Authors
137
139
  ----
138
- * [Timur Kozmenko](https://twitter.com/Timrael)
140
+ * [Timur Kozmenko](https://twitter.com/Timrael) - timraell@gmail.com
@@ -1,17 +1,14 @@
1
1
  module SocialShares
2
2
  class Facebook < Base
3
- URL = 'http://api.ak.facebook.com/restserver.php'
3
+ URL = 'https://graph.facebook.com/fql'
4
4
 
5
5
  def shares!
6
6
  response = RestClient.get(URL, {
7
7
  :params => {
8
- :urls => checked_url,
9
- :v => '1.0',
10
- :method => 'links.getStats',
11
- :format => 'json'
8
+ :q => "SELECT share_count FROM link_stat WHERE url='#{checked_url}'"
12
9
  }
13
10
  })
14
- JSON.parse(response)[0]['share_count'] || 0
11
+ JSON.parse(response)['data'][0]['share_count'] || 0
15
12
  end
16
13
  end
17
14
  end
@@ -1,3 +1,3 @@
1
1
  module SocialShares
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_shares
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timur Kozmenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-10 00:00:00.000000000 Z
11
+ date: 2015-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client