fb_graph 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fb_graph.gemspec +2 -2
- data/lib/fb_graph/node.rb +8 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/fb_graph.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fb_graph}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["nov matake"]
|
12
|
-
s.date = %q{2010-05-
|
12
|
+
s.date = %q{2010-05-21}
|
13
13
|
s.description = %q{A Ruby wrapper for Facebook Graph API}
|
14
14
|
s.email = %q{nov@matake.jp}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/fb_graph/node.rb
CHANGED
@@ -71,6 +71,14 @@ module FbGraph
|
|
71
71
|
case response.body
|
72
72
|
when 'true'
|
73
73
|
true
|
74
|
+
when 'false'
|
75
|
+
# NOTE: When the object is not found, Graph API returns
|
76
|
+
# - error response (JSON) when the identifier contains alphabet (ex. graph.facebook.com/iamnotfound)
|
77
|
+
# - false when the identifier is only integer + underbar (ex. graph.facebook.com/1234567890, graph.facebook.com/12345_67890)
|
78
|
+
# This is an undocumented behaviour, so facebook might chaange it without any announcement.
|
79
|
+
# I've posted this issue on their forum, so hopefully I'll get a document about Graph API error responses.
|
80
|
+
# ref) http://forum.developers.facebook.com/viewtopic.php?pid=228256#p228256
|
81
|
+
raise FbGraph::NotFound.new(404, 'Graph API returned false, so probably it means your requested object is not found.')
|
74
82
|
else
|
75
83
|
_response_ = JSON.parse(response.body).with_indifferent_access
|
76
84
|
if _response_[:error]
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- nov matake
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-21 00:00:00 +09:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|