Home White Label

White Label

Fabio
By Fabio
2 articles

Setting Up Instagram Account

1. A valid facebook account. 2. A valid facebook page. 3. A valid instagram professional account. Register A Facebook App​ To use Instagram Channel, you have to create a Facebook app in the developer portal. You can find more details about creating Facebook developer app here. Click on the "Create App" button Select the option "Other". facebook_other_app For the app type, choose "Business" Enter basic details like the app name and email. Once you register your Facebook App, you will have to obtain the App Id and App Secret. These values will be available in the app settings and will be required while setting up Snyptp environment variables. Configuring the Environment Variables in Snypto​ Configure the following Snypto environment variables with the values you obtained during the Facebook app setup. The IG_VERIFY_TOKEN should be a unique and secure string that you provide when configuring the Instagram app. Restart the Snypto server after updating the environment variables IG_VERIFY_TOKEN= FB_APP_SECRET= FB_APP_ID= Configure the Facebook App​ In the app settings, add your "Snypto installation domain" as your app domain.  Add the "Instagram Graph API" product via the Facebook app dashboard.  1. Go to the app settings and select "Webhooks". From there, choose Instagram and click on the "Subscribe to this object" button.  2. Provide the Callback URL as {your_Snypto_installation_url}/webhooks/instagram and the Verify token as IG_VERIFY_TOKEN from your environment variable.  Connect the facebook page with instagram account​ Go to Facebook pages and select your page and open the settings facebook_page_settings Go to "Linked accounts" and connect your instagram professional account. facebook_connect_instagram Select the option "Business" instagram_connect_facebook Select the instagram account category select_category_instagram If everything is okay, you will see the message "Instagram connected.” instagram_connect_success Head over to Snypto and create a Messenger inbox. Please refer to this guide for more details on creating a Messenger inbox in Snypto. So whenever you receive any message on Instagram, it will redirect to your Facebook page. Testing the Instagram channel​ Until the application is approved for production, Facebook wouldn't send the new messages on your instagram to Snypto. To test the changes until the app is approved for production. Follow the steps Create a Test app for your app. Add the Instagram Graph API product via the Snypto app dashboard.  Go to the app settings and select "Webhooks". From there, choose Instagram and click on the "Subscribe to this object" button.  Provide the Callback URL as {your_Snypto_installation_url}/webhooks/instagram and the Verify token as IG_VERIFY_TOKEN from your environment variable.  Open the test app and add extra product for the test app: Instagram Basic Display In the app settings, add the platform "Website" and give Site URL as your installation URL. Head over to the Instagram Basic Display section and create a new app. Add Instagram Testers by clicking "Add or Remove Instagram Testers" button. Make sure that you have selected the role Instagram Tester while creating a new tester. Click on Edit subscriptions under Webhook > Instagram and subscribe to the following, message_reactions messages messaging_seen Note: You should do this step for both normal and test apps. Head over to Snypto and create a Messenger inbox. Please refer to this guide for more details on creating a Messenger inbox in Snypto. . Send a message to the connected Instagram account from Instagram Testers, and it should appear in Snypto now Going into production.​ Before you can start using your Facebook app in production, you will have to get it verified by Facebook. Refer to the docs on getting your app verified. Obtain advanced access to the required permissions mentioned below for your Facebook app instagram_manage_messages instagram_basic pages_show_list pages_manage_metadata pages_messaging business_management Note: If your facebook app's version is more than 7.0 then you will need extra permission according to facebook's updated policy. Make sure you get permission for. pages_read_engagement Developing or Testing Facebook Integration in your machine​ Install ngrok on your machine. This will be required since Facebook Messenger APIs will only communicate via https. brew cask install ngrok Configure ngrok to route to your Rails server port. ngrok http 3000 Go to the Facebook developers page and navigate into your app settings. Add localhost as your app domain and add a privacy policy URL in the app settings. In the Webhook > Instagram settings shown in the above image, configure the callback url with the following value. {your_ngrok_url}/webhooks/instagram Update verify token in your Snypto environment variables. You will also have to add a Facebook page to your Access Tokens section in your Messenger settings page. Restart the Snypto local server. Then, your Snypto setup will be ready to receive Facebook messages. Test your local Setup​ 1. After finishing the setup above, create a Messenger inbox after logging in to your Snypto Installation. 2. Send a message to your Facebook Page from your Instagram account. 3. Wait and confirm incoming requests to /webhooks/instagram endpoint in your ngrok screen. 4. You can also verify your callback URL by clicking on Test for the subscribed Instagram fields. Go to webhook Instagram and click on Test with v11.0  Note: You can have only one app connected to the Snypto for Instagram and Facebook combined as the Messenger platform is common. But suppose you want to have separate channels for Instagram and Facebook. In that case, you can have multiple Facebook pages inside your app that would be connected to Facebook users and Instagram users separately and then connected to the different inbox in the Snypto page. Checklist​ 1. Integrate the Facebook test app and Send a message from the Instagram tester to the connected account. 2. Make sure your Instagram account is a business account. 3. If the Instagram test account can receive the message and forward it to the webhook URL, then submit it for review. 4. If the Instagram test account is not able to receive the message and forward it to the webhook URL - Check the logs if you are receiving the message to {your-app-url}/webhooks/Instagram - If the logs are present for the above endpoint, if there are any errors, then reach out to us. We will help you out. - If the logs aren't present for the above endpoint, then raise a bug for the Facebook team or follow this bug https://developers.facebook.com/support/bugs/468852858104743/ 5. If you are not facing the above issue and can get the message, but the review isn't passing, then reach out to the reviewer. - When your app gets rejected, open the rejected submission. You can see the messenger icon in the bottom right corner to support you with your rejected review. - You can talk to the support team and ask your questions about the submission and the reason for the rejection. 6. If your test app passed the review, it's good to go into production. 7. If you face an issue on production that you cannot receive the messages, then reach out to us with the error logs.

Last updated on Sep 16, 2024

Setting Up Facebook

To use Facebook Channel, you have to create a Facebook app in the developer portal. You can find more details about creating Facebook apps here. Prerequisites​ 1. A valid facebook account. 2. A valid facebook page. Register A Facebook App​ 1. Go to Facebook developer portal and click on the "Create App" button facebook_create_app 2. Select the option "Other". facebook_other_app 3. For the app type, choose "Business". facebook_business 3. Enter basic details like the app name and email. Once you register your Facebook App, you will have to obtain the App Id and App Secret. These values will be available in the app settings and will be required while setting up Snypto environment variables. Configuring the Environment Variables in Snypto​ Configure the following Snypto environment variables with the values you obtained during the Facebook app setup. The FB_VERIFY_TOKEN should be a unique and secure string that you provide when configuring the Facebook app. Generate a random string and set it as the FB_VERIFY_TOKEN. Facebook will include this string in all verification requests. Restart the Snypto server after updating the environment variables FB_VERIFY_TOKEN= FB_APP_SECRET= FB_APP_ID= Configure Facebook Login​ 1. Add the Facebook Login product via the Facebook app dashboard. 2. Enable Web OAuth Login, Login with Javascript SDK and add your self-hosted domain to the Allowed Domains for the JavaScript SDK input. Configure the Facebook App​ 1. In the app settings, add your Snypto installation domain as your app domain. 2. In the products section in your app settings page, Add "Messenger" 3. Go to the Messenger settings and configure the call back URL 4. Provide the Callback URL as {your_snypto_installation_url}/bot and the Verify token as FB_VERIFY_TOKEN from your environment variable. 5. Head over to Snypto and create a Messenger inbox. Choose a page for which your Facebook developer account has admin access to. Testing the Facebook channel​ Until the application is approved for production, Facebook wouldn't send the new messages on your page to Snypto. To test the changes until the app is approved for production. Follow the steps 1. Head over to the messenger section in your app settings page, in Facebook developers. Click Add or remove pages and connect the page which you choose while creating the Snypto Messenger inbox. 3. After connecting the pages, Click on Add subscriptions from the connected page. 4. Subscribe to the following fields and save the subscription. messages messaging_postbacks message_deliveries message_reads message_echoes 4. Send a message to the connected page from your Facebook account and it should appear in Snypto now. Going into production.​ Before you can start using your Facebook app in production, you will have to get it verified by Facebook. Refer to the docs on getting your app verified. Obtain advanced access to the required permissions mentioned below for your Facebook app pages_messaging pages_show_list pages_manage_metadata business_management pages_read_engagement Make sure your facebook app subscription version is 17.0, we have updated the FB subscription with the latest version, so change the permission subscription version under the facebook app webhooks option. Developing or Testing Facebook Integration in your machine​ Install ngrok on your machine. This will be required since Facebook Messenger API's will only communicate via https. brew cask install ngrok Configure ngrok to route to your Rails server port. ngrok http 3000 Go to the Facebook developers page and navigate into your app settings. In the app settings, add localhost as your app domain. In the Messenger settings page, configure the callback url with the following value. {your_ngrok_url}/bot Update verify token in your Snypto environment variables. You will also have to add a Facebook page to your Access Tokens section in your Messenger settings page. Restart the Snypto local server. Your Snypto setup will be ready to receive Facebook messages. Facebook API version​ We support facebook API version v13.0 going forward, which you can update in the facebook app advanced settings.  Test your local Setup​ 1. After finishing the set-up above, create a Facebook inbox after logging in to your Snypto. Installation. 2. Send a message to your page from Facebook. 3. Wait and confirm incoming requests to /bot endpoint in your ngrok screen.

Last updated on Sep 16, 2024