fbrails 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fbrails/version.rb +1 -1
- data/lib/fbrails.rb +6 -2
- metadata +1 -1
data/lib/fbrails/version.rb
CHANGED
data/lib/fbrails.rb
CHANGED
@@ -29,12 +29,16 @@ end
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.token_valid?(token,expires = false)
|
32
|
-
if expires
|
32
|
+
if expires.class = Time && expires < Time.new
|
33
33
|
return false
|
34
34
|
end
|
35
35
|
|
36
36
|
url = "https://graph.facebook.com/me/?access_token=#{token}"
|
37
|
-
|
37
|
+
begin
|
38
|
+
result = Fbrails.get(url)
|
39
|
+
rescue
|
40
|
+
return false
|
41
|
+
end
|
38
42
|
if result == false
|
39
43
|
return false
|
40
44
|
elsif result.has_key?("id")
|