-
-
Save hechien/1228618 to your computer and use it in GitHub Desktop.
Facebook fanpage checker.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class FBFanPageChecker | |
require 'rubygems' | |
require 'koala' | |
include Koala::Facebook | |
def initialize(app_id, app_secret, callback_url='http://localhost') | |
@oauth = OAuth.new(app_id, app_secret, callback_url) | |
@rest = RestAPI.new(@oauth.get_app_access_token) | |
end | |
def check(page_id, user_id) | |
@rest.rest_call("pages.isfan", {:page_id => page_id, :uid => user_id}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment