lib/fb_graph/application.rb in fb_graph-1.6.1 vs lib/fb_graph/application.rb in fb_graph-1.6.2
- old
+ new
@@ -24,26 +24,9 @@
@category = attributes[:category]
@link = attributes[:link]
@secret = attributes[:secret]
end
- # == Get OAuth access token
- #
- # Obtain an OAuth access token associated with your application via the OAuth Client Credentials Flow.
- #
- # ref) http://developers.facebook.com/docs/api#analytics
- #
- # app = FbGraph::Application.new(APP_ID)
- # app.get_access_token
- # # => access token as String
- # app.access_token # once get_access_token is called, access token is cached.
- # # => access token as String
- #
- # This method is automatically called when access token needed and application secret has already given.
- #
- # app = FbGraph::Application.new(APP_ID, :secret => APP_SECRET)
- # app.subscriptions # get_access_token is called automatically
- # # => Array of FbGraph::Subscription
def get_access_token(secret = nil)
self.secret ||= secret
auth = Auth.new(self.identifier, self.secret)
response_string = auth.client.request(:post, auth.client.access_token_url, {
:client_id => self.identifier,
\ No newline at end of file