Maintaining the state of conversation in Facebook Messenger - facebook-messenger

I am building a facebook messenger bot which needs to take multiple inputs from the user. One way of storing all the inputs is to store them in database. However, I found a field "metadata" in the Send API request. The description of this field is also very promising - "Custom string that will be re-delivered to webhook listeners". However, when I fill this field with user inputs, I don't get them back with the next call.I used the sample app provided by Facebook to do this test.
Has anyone found a use for metadata property? Is it working?

Related

Track user acquisition on exit - Google Analytics

Is it possible to get a current users acquisition channel ( Facebook, Glassdoor, etc... ) and append it to a string during an onSubmit?
We have a careers page on our site with a search form that when filled out and submitted takes the user to a 3rd party software we use for our job listings. What we would like to do is track the users that submitted that form so we can see what channel lead to them looking for a job.
Ex:
User visits our Facebook page and clicks link to our site. Once on our site they fill out the job search form and is sent to our jobs listing site. We use JS to create the onSumbit url and fill it with the fields they answered and would like add another "acquisition" parameter to it with said acquisition.
You can store the referrer in a cookie if this is different from the domain of your website. In this way you can know where the user came from and use that value in the string you send to submit.

How to send user data to developer? Xcode/Swift

I'm creating my first application that requires me to update the app based on user input. I've been searching for the best way to send input to me. For example, I have a button that when the user presses I would like to send me the information they've added to a text field. Being new to this, I thought this could be done by simply sending the information to a specified email, but from what I've researched I will need some sort of database. Looking through the Apple Developer Documentation I don't even know which topic I should be looking at to figure this out, any help or direction would be very helpful!
You need to setup a server (using an API) to receive the information.
Usually you will use a webservice to receive the info from the app, although there are other ways to do that.
Sending an email through iOs would require the user to accept the email that is being sent, so doesn't look like a good idea.
Take a look at some options available to create webservices (django rest framework or flask), Google's Firebase also can be handy in this situation, since is only integrating it with your app and storing the data you want to store, with easy integration for Authentication and user tracking.

Send an email when records are added to Firebase database

I would like to send an email to the signed user with the data that was added by the user to the Firebase database. I am using AngularJS UI. Is there are Firebase module which will trigger email with the data being added to the signed user.
Thanks, Rajesh
You should look into Cloud Functions for Firebase. This will let you write database triggers that run on Google servers that can act whenever data in your database changes. There is plenty of sample code the illustrates some of the many things you can do, including one specific example that shows how to send email in response to a change in the database.

Writeback to Salesforce using Powerforms

I am using Powerforms as an approach to get signatures using the DocuSign. What I want is to send some part of the data back to Salesforce from the PDF while the user signs it. I created custom fields on the PDF, related them to Salesforce, checked the writeback and allow sender to edit boxes but the data hasn't got back to SF yet. Any help?
When you send from Salesforce, there is information passed to document (such as the SourceID and Source Object Type), that DocuSign Connect will attempt to match to a record to process a request to push the data back into Salesforce.
If you are using a PowerForm, you would have to pass along similiar data and setup DocuSign Connect correctly for it to relate the data back to a Salesforce record.
This is something that is doable with customization, but not functional out of the box.

How to implement Facebook Post Type objects in GAE?

I a new programmer and trying to implement a facebook type "feed" in my application. Like Whenever a user do some changes in his profile his linked profiles will get to know that in the form of news feed.
But I am stuck on that as I thought whenever any user saves any data (like "News", "Blog", "Event" or any "Comment") just send the id of the respective classes to the linked profiles and they will see it. Since the id is not generated before the object is saved , the problem is how can I send them. I thought of following workarounds but each have some problem.
Whenever a user posts a news .... a Post object will be made and added to User's Post Collection.
But How do the other users will knew about it.....
1) Send them the id .... but when the id is not created how can you send them the id.
2) Send them the post message and when ever they will click them ... the latest post to them from the particular user will be shown.. but if more than 3 messages then which will be shown?? Shown by the post creation Date no post greater than that date is shownn....but he needs to be shown newer posts..
3) Save the post in all followers feed. the data will be much larger then
4) all the followers on login will check all the persons they are following and save their feed after the time stamp? How to implement this as the Post is saved in User's Profile so I would have to check all the following person and then just check the feed and show them on his feed box; I think I would have to use batch Processes. Processing will take much longer.
I am using objectify-appengine to do operations on GAE.
Any help is appreciated
Are you wanting to update the page with posts in real time like on Facebook and Twitter? To achieve this on Google App Engine you can use the Channel API, which works in conjunction with Javascript to listen for new data and update the DOM.
This talk at Google I/O 2009 by Brett Slatkin describes exactly the pattern you should use for this.

Resources