social_butterfly 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ module SocialButterfly::Services
|
|
17
17
|
end
|
18
18
|
|
19
19
|
response = JSON.parse(c.body_str)
|
20
|
-
if response[0]['error']
|
20
|
+
if !response[0].present? || response[0]['error'].present?
|
21
21
|
stats[:shares] = 0
|
22
22
|
else
|
23
23
|
stats[:shares] = response[0]['result']['metadata']['globalCounts']['count'].round
|
@@ -4,5 +4,12 @@ require 'social_butterfly/services/twitter_service'
|
|
4
4
|
|
5
5
|
module SocialButterfly
|
6
6
|
module Services
|
7
|
+
def self.track(content, options={})
|
8
|
+
results = {}
|
9
|
+
results[:facebook] = SocialButterfly::Services::FacebookService.track(content, options)
|
10
|
+
results[:google_plus] = SocialButterfly::Services::GooglePlusService.track(content, options)
|
11
|
+
results[:twitter] = SocialButterfly::Services::TwitterService.track(content, options)
|
12
|
+
results
|
13
|
+
end
|
7
14
|
end
|
8
15
|
end
|