Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.6 KB

File metadata and controls

27 lines (20 loc) · 1.6 KB

SunshineConversationsClient::Messenger

Properties

Name Type Description Notes
type String Facebook Messenger Setup steps: - Take note of your Facebook app ID and secret (apps can be created at developer.facebook.com); - The Facebook app must have been submitted to Meta for app review with the “pages_manage_metadata” (to retrieve Page Access Tokens for the Pages, apps that the app user administers and set a webhook) and “pages_messaging” (to send messages) permissions. - In order to integrate a Facebook Messenger app you must acquire a Page Access Token from your user. Once you have acquired a page access token from your user, call the Create Integration endpoint with your app secret and ID and the user’s page access token. [optional] [default to 'messenger']
page_access_token String A Facebook Page Access Token.
app_id String A Facebook App ID.
app_secret String A Facebook App Secret.
page_id Float A Facebook page ID. [optional]
page_name String A Facebook page name. [optional]

Code Sample

require 'SunshineConversationsClient'

instance = SunshineConversationsClient::Messenger.new(type: null,
                                 page_access_token: your_access_token,
                                 app_id: your_facebook_app_id,
                                 app_secret: your_facebook_app_secret,
                                 page_id: 123212323432123,
                                 page_name: An Awesome Page)