Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added another bad json method.

  • Loading branch information...
commit a31feaafa5223ce9a515c49db7651c185aa95df7 1 parent 7e68ed5
@treeder treeder authored
Showing with 22 additions and 2 deletions.
  1. +2 −1  lib/mini_fb.rb
  2. +20 −1 test/test_mini_fb.rb
View
3  lib/mini_fb.rb
@@ -154,7 +154,8 @@ def get(params)
end
BAD_JSON_METHODS = ["users.getloggedinuser", "auth.promotesession", "users.hasapppermission",
- "Auth.revokeExtendedPermission", "pages.isAdmin", "pages.isFan",
+ "Auth.revokeExtendedPermission", "auth.revokeAuthorization",
+ "pages.isAdmin", "pages.isFan",
"stream.publish",
"dashboard.addNews", "dashboard.addGlobalNews", "dashboard.publishActivity",
"dashboard.incrementcount", "dashboard.setcount"
View
21 test/test_mini_fb.rb
@@ -1,7 +1,7 @@
require 'test/unit'
require 'uri'
require 'yaml'
-require 'active_support'
+require 'active_support/core_ext'
require '../lib/mini_fb'
class MiniFBTests < Test::Unit::TestCase
@@ -11,6 +11,8 @@ def setup
@config = File.open(File.expand_path("~/.mini_fb_tests.yml")) { |yf| YAML::load(yf) }
puts @config.inspect
MiniFB.log_level = :debug
+
+# MiniFB.oauth_url(@config["fb_api_key"], @config["fb_secret"])
end
def teardown
@@ -29,6 +31,23 @@ def test_signature
end
+ def test_me_with_fields
+ fields = {
+ 'interests' => [:name],
+ 'activities'=> [:name],
+ 'music' => [:name],
+ 'videos' => [:name],
+ 'television'=> [:name],
+ 'movies' => [:name],
+ 'likes' => [:name],
+ 'work' => [:name],
+ 'education' => [:name],
+ 'books' => [:name]
+ }
+
+ snap = MiniFB.get(access_token, 'me', :fields =>fields.keys)
+ end
+
def test_basic_calls
end
Please sign in to comment.
Something went wrong with that request. Please try again.