How to get Facebook account linking event in Dialogflow intent? - facebook

I am creating a Facebook chat bot with api.ai (Dialogflow). The intents are working fine and I have done Facebook account linking by creating a Login button in messenger. The account linking is working and the account gets successfully linked. But I couldn't get the callback when the account is linked in Dialogflow.
There must be some Facebook account linking event that we can add in our intent to trigger the intent when the event is fired.
Please help how can we handle Facebook account linking with Dialogflow?

Related

How to use instagram as a chatbot and i already use facebook messenger for the same

I created an app for my chatbot application and integrate it on Facebook messenger this works perfectly, Now I want to integrate the same on Instagram so I created the business account named "test_MyApplicationName" and then connect it with the same Facebook app which I use for messenger. also created a webhook and give all permissions which are necessary for IG but still, I don't get any response from Instagram messaging to my backend(I also added the recipient/test user in the app). So
I request to you guys please help me to achieve this.
For Instagram is it necessary to have a live/verified app?
Thanks
Kartikey Gupta
You must use a test account for that.
Go to app dashboard-> roles -> test user.
create a test user with pages_metadata, instagram_basic, pages_messaging, instagram_messaging permission.
after creating a test account, log in with that. Create a Facebook page after that go to Instagram open an account using Facebook.
• test in the account should start with test_ example:
test_albert, test_username.
• goto facebook page setting -> Instagram -> connect to Instagram
• go to Instagram settings -> privacy -> Allow access to the message should turn on.
• Connect your app again with the test Facebook account and select the Instagram account while connecting.
P.S: you must have followers between 1-100k to receive an Instagram webhook event from that particular account.

How do I create and store data in a user's profile from a Facebook Messenger Dialogflow Bot using verified details from Facebook account?

I am creating a bot using Dialogflow which is connected to Facebook Messenger. Both Messenger based Chatfuel and Dialogflow use Facebook Authentication Intent and Google Sign-In respectively.
However, I could not find a way to fetch verified user details from Facebook and store them as standalone profiles and authenticate them automatically when users log back into Facebook and start a new chat.
My purpose is to:
Fetch Verified Details from Facebook Profile (Name, E-mail and Date of Birth)
Use Google Authentication to Verify Phone Number and Generate Unique UserID
Store above details along with a few other rows of data. (Still not sure where and how to store)
Fetch the above details when the user starts a new chat on Facebook Messenger after a Google OTP Authentication.

How to make a messenger chat bot without a facebook app and webhook?

I went through the documentation for creating a chatbot for messenger platform.
All I find there, I need a server, which in the case used as a service for the Facebook platform.
The server also validates the webhook from facebook app.
Now I see, for a chatbot, I need a facebook app, webhook server and definitely a facebook page.
Then I find an application Flow XO, where I only put the page name and the bot is ready.
My question is, how they(flow.xo) can communicate facebook page without a Facebook app(appId, appSecret) and webHook.
My question is, how they can communicate facebook page without a Facebook app(appId, appSecret) and webHook.
They can’t.
They use their server and their app to communicate with the API, on behalf of the users that grant them access to their pages, by providing the necessary permissions when they log in to that app.
Facebook allows to create a Facebook App which integrates multiple chatbots. At Amio, we ask you for permission using Facebook OAuth. When you give us these permissions we send and receive message on your behalf. This allows you to create a chatbot using Amio API without need of creating a Facebook App.
Facebook Page is always needed as this is the entry point of users interacting with your bot. You can check Amio documentation for more detail.

Sending notifications with Facebook graph API not authorized with regular users

I have created a Facebook App and published it today with Canvas Web platform.
The users can authorize the application and I can send notifications to them using the Facebook API that appear on their Facebook account on the Web.
However, it works with the developer user but not with regular users. For regular users the API call to send notifications returns this error response:
{"error":{"message":"(#200) Your app is not approved for content update notification at this time", "type":"OAuthException","code":200,"fbtrace_id":"GPVF+lOxzgp"}}
The application is published and is live. It is for publishing landing pages with videos, when when the user signs up using Facebook, he will get a notification when a new page with a video is published, so he can watch the video inside the Facebook canvas iframe.
What do I need to do to have new content notification approved? I just asked for email and profile permissions and the documentation says it does not need additional permissions to send notifications. So I have not items to submit for review.
I am using this API call described here:
https://developers.facebook.com/docs/games/services/appnotifications
It seems I was doing a mistake which as to pass a type parameter set to the content_update value. Removing that parameter solved the problem.

Post to Facebook and twitter when one button?

can someone please help me out, how would I connect facebook and twitter up to the same button? So for example someone has written a status update, and with a one button press it sends it both to Facebook and twitter?.
Thanks..
What you can do is create a service that first connects and authenticates with users Facebook and Twitter account. Once that is done then you can call that service to post the update. Let me expand:
There is a service called IFTTT https://ifttt.com/
What this service does is authenticates both your facebook and twitter account (one by one). Once IFTTT gets the permission, then whenever you post something on any one these accounts, it calls the service and does the same on other account. So, you can create a recipe:
If I post on Facebook, then post on Twitter as well.