Class: FacebookApp::AdminController
- Inherits:
-
FacebookAppController
- Object
- ActionController::Base
- FacebookAppController
- FacebookApp::AdminController
- Defined in:
- app/controllers/facebook_app/admin_controller.rb
Instance Method Summary collapse
- #clear_conversion_data ⇒ Object
- #create_fb_credentials ⇒ Object
- #new_fb_credentials ⇒ Object
- #register_app_access_token ⇒ Object
- #show ⇒ Object
- #uninstall_app ⇒ Object
Instance Method Details
#clear_conversion_data ⇒ Object
22 23 24 25 |
# File 'app/controllers/facebook_app/admin_controller.rb', line 22 def clear_conversion_data FacebookApp::Conversion.destroy_all redirect_to facebook_app.admin_path end |
#create_fb_credentials ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'app/controllers/facebook_app/admin_controller.rb', line 35 def create_fb_credentials @fb = FacebookApp::FacebookCredentials.new(params[:facebook_app_facebook_credentials]) if @fb.save redirect_to facebook_app.admin_path, :notice => "Successful updated facebok credentials" else render :new_fb_credentials end end |
#new_fb_credentials ⇒ Object
13 14 15 |
# File 'app/controllers/facebook_app/admin_controller.rb', line 13 def new_fb_credentials @fb = FacebookApp::FacebookCredentials.current_credentials end |
#register_app_access_token ⇒ Object
17 18 19 20 |
# File 'app/controllers/facebook_app/admin_controller.rb', line 17 def register_app_access_token FacebookApp::FacebookCredentials.register_app_access_token render :js => "alert('App access token successfully registered as #{FacebookApp::FacebookCredentials.app_access_token}');".html_safe end |
#show ⇒ Object
8 9 10 11 |
# File 'app/controllers/facebook_app/admin_controller.rb', line 8 def show @conversion_summary = FacebookApp::ConversionSummary.new @fb = FacebookApp::FacebookCredentials.current_credentials end |
#uninstall_app ⇒ Object
27 28 29 30 31 32 33 |
# File 'app/controllers/facebook_app/admin_controller.rb', line 27 def uninstall_app session[:at] = nil session[:uid] = nil .clear flash[:notice] = "You logged out as a Facebook user" redirect_to :back end |