-
Notifications
You must be signed in to change notification settings - Fork 5
include Adminpanel::Facebook
Jose Ramon edited this page Feb 10, 2015
·
13 revisions
With this, the resource is going to have a facebook button to share the resource on facebook, you'll have to set your fb_app_id and fb_app_secret in your configuration and have the fb app configured correctly (It need at leasst permissions to access user pages and to create posts).
You have to whitelist the params fb_message, and fb_page_access_key in your controller
And overwrite instance_method
def share_link
Rails.application.routes.url_helpers.nintendo_url(self, host: 'www.rentadoraisla.com')
end
That method should return the link that it's going to be shared.
Make sure your facebook application's configuration, under Settings > Advanced includes your host (development and production) url in the "Valid OAuth redirect URIs". (for development http://localhost:3000 etc...