facebook-cli 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fbcli/auth.rb +4 -5
- data/lib/fbcli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e73b653e961bb1c35903f400db8e71aa06d851e2
|
|
4
|
+
data.tar.gz: 2ef15430d063b9304b261981dc9603ceb22affb6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d34aed99693ee1f0a23aaba1bbfcc45535bf81f039f7783891118e8cb8c3c496a4ecee1412a74e3cd8a3230f8d8f0a05891f951e6c565cd886e44bbe44ac825e
|
|
7
|
+
data.tar.gz: f20b080c1116bf8d9314671756051a769d614e6ac7bf65c7c1cdd1ad46383652bb690e218853a802f254866c5f60c6b1f30c3e287a2d110f77ebaafae3d52106
|
data/lib/fbcli/auth.rb
CHANGED
|
@@ -4,7 +4,7 @@ require 'webrick'
|
|
|
4
4
|
require 'json'
|
|
5
5
|
|
|
6
6
|
module FBCLI
|
|
7
|
-
API_VERSION = "2.
|
|
7
|
+
API_VERSION = "2.10"
|
|
8
8
|
|
|
9
9
|
def self.listen_for_auth_code(port, app_id, app_secret)
|
|
10
10
|
uri = "https://www.facebook.com/dialog/oauth?client_id=#{app_id}" +
|
|
@@ -12,11 +12,11 @@ module FBCLI
|
|
|
12
12
|
"&scope=user_likes,user_friends,user_posts,user_photos,user_videos,user_events,publish_actions"
|
|
13
13
|
|
|
14
14
|
puts <<-EOM
|
|
15
|
-
|
|
15
|
+
Open this URL in a web browser and allow access to the Facebook Graph on behalf of your user account:
|
|
16
16
|
|
|
17
17
|
#{uri}
|
|
18
18
|
|
|
19
|
-
Waiting
|
|
19
|
+
Waiting to receive authorization code on port #{port}...
|
|
20
20
|
|
|
21
21
|
EOM
|
|
22
22
|
|
|
@@ -36,7 +36,6 @@ Waiting for authorization code on port #{port}...
|
|
|
36
36
|
access_token = get_access_token(port, app_id, value, app_secret)
|
|
37
37
|
else
|
|
38
38
|
puts "Received unexpected request: #{req.query_string}"
|
|
39
|
-
# TODO: Handle forseeable cases
|
|
40
39
|
end
|
|
41
40
|
|
|
42
41
|
res.body = 'You may now close this window.'
|
|
@@ -46,7 +45,7 @@ Waiting for authorization code on port #{port}...
|
|
|
46
45
|
# Allow CTRL+C intervention
|
|
47
46
|
trap 'INT' do server.shutdown end
|
|
48
47
|
|
|
49
|
-
#
|
|
48
|
+
# Block execution on this thread until server shuts down
|
|
50
49
|
server.start
|
|
51
50
|
|
|
52
51
|
# Return access token
|
data/lib/fbcli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: facebook-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ildar Sagdejev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: koala
|