Facebook Application Invite using Graph API - asp.net-mvc-3

I am developing a website in which i have a feature of inviting facebook friends, when i invite a friend, he will get a notification on his facebook account,I want the functionality that when he clicks on notification he'll redirected to my website(for eg www.abc.com/signup)
How can i achieve this i am using Graph API, also after clicking on notification he will able to know from whom the invitation has arrived.
How can i redirect user to my website after clicking on notification(with any query string parameters)

Related

How to create MS Teams Survey App Messaging Extension

I am currently creating a survey app for ms teams similar to Polly.ai/survey monkey
The flow would be
User installs app,
app appears as messaging extension on the chat window,
user clicks app to opens page to create survey,
on submit an adaptive card is generated,
the same is responded back to teams,
The new card appears on the message Hi,
I am currently creating a survey app for ms teams similar to Polly.ai/survey monkey
The flow would be
User installs app,
app appears as messaging extension on the chat window,
user clicks app to opens page to create survey,
on submit an adaptive card is generated=>
the same is responded back to teams =>
The new card appears on the message create pane,
User hits enter to post the survey to the group,
All the group members respond to the survey ,
The same is logged
Can anyone help me in providing some links from where I can start.
Or maybe throw some light on what should be my approach.
My progress so far.
Created a teams bot,
On messaging extension invoke returned url that contains HTML for survey creation which is created in vue.js. Used msteams js to submit the json for created survey back to the bot,
Generated an adaptive card with json received and the a new survey created in db,
Sent the card back to teams as message attachment,
The card is displayed in message create pane,
User hits enter to post the card in the group,
Caught the action.submit event from adaptive card on bot framework.
Also, please note while I am generating the card I don’t have user email in the turncontext as well.
Please throw some light on this
Thanks
Please have a look at App templates available. I think for your case Poll and Survey are the best app template available.
Thanks

Add a Google Chat bot programmatically

I have a web application for organizations. I would like to allow users to add an existing Google Chat bot to their Google Chat workspace programmatically - example workflow: Jack visits mywebsite.com, presses button 'Add site bot' and the bot gets added to their Google Chat where the bot can asynchronously message the user.
Is this functionality possible at the moment or does the user have to connect the bot manually through the Google Chat interface?
Thanks,
Mihai

Bot Framework receiving Facebook Messenger Event

Referral events should send an event according to the documentation here. See #2 for more information.
I am trying to receive this event, however, it does not seem as though the event is sent to the bot framework. We verified that the permission is granted with Facebook Messenger setup. I am using nGrok and can see all messages routed to the bot, however, this event does not show up when using an http://m.me/ link
Are these events supported?
You need to subscribe to Referral Messages in the Facebook Messenger Developer Portal. Open the settings blade on the left, scroll down to webhooks, and hit edit events.
Then enable messaging referrals and click save.
When the user clicks on the m.me link it will open the conversation and send a message activity to the bot. Note, I could only get this behavior to work if I added a ref parameter to the link - https://m.me/<PAGE_NAME>?ref=<VALUE>.
Hope this helps!

Facebook Messaging API login permissions

What are Item for simple chat bot developed Facebook messaging API? My app just respond to the text message send by a Facebook user. I want to make my chatbot public but Facebook requires to add some items (permissions). Could you please help me out
You need manage_pages and pages_messaging permissions. You also need to submit your bot for approval in the 'Messenger' tab of your app console.

How to get parameters from link sent to Facebook Notifications

Not sure how to ask this question. I have implemented a ConnectInterceptor. However, I don't think it will have the parameters that are in the link sent to a user in their Facebook notifications.
Here is the scenario. A user is logged into our application (Facebook Flash app, iOS app, Android etc. Doesn't matter) The user has connected their Facebook account to their login. Now they go to a page that shows all their friends on Facebook where they can send an invite to that friend to join our app (signup). In that invite that we send to the friend's notifications has the userID (our app) and a gift/productID in the link that will take the user to our app in Facebook where they can join. When they join, it will connect their Facebook account to our app, and at that time we have to give free chips to the user that invited the Facebook Friend (hence the userID in the link) and give any gift to the new user (hence the gift/productID) in the link sent to their notifications.
So I need access to the userID and gift/productID when creating the new user in our app. New user is created in a ConnectionSignUp implementation. But that has execute(Connection) which will definitely not have the user and gift IDs in the call.
Basically, in our app we have players inviting Facebook friends to join the game, and if they do the player inviting will get free chips and the new player might get a gift or free chips, but only when the new player signs up/links their Facebook account in our app.
So I thought an interceptor would be able to get it from the
void postConnect(Connection<T> tConnection, WebRequest webRequest) call.
Will that work, or is there another way to implement this use case that we need.
Thanks
Mark
See comments for answer. Interceptors is the way to go

Resources