Twitter message reply with direct message link not carrying over conversation context - twitter

I have a Dialogflow and Twitter integration and all seems to be working fine, except for one scenario.
I have an intent that is looking for negative statements from tweets that mention the Twitter user linked to the Dialogflow integration (lets call it #Target). The purpose of this is to then reply back with a Twitter direct message (DM) link, inviting the person to engage in conversation to further explore their problem.
The scenario steps that do not work are:
Send Tweet to #Target saying for example "Your service is really bad". At this point, the output context is "negative-sentiment" if DF recognises it.
If that is the case, DF then sends back a response with a link that will allow the user to open up a DM session to further explain their issue. In this example they may have a gas supply issue.
The user opens the link in the tweet reply to start the DM.
At this point, I am looking for an explanation of the issue, for example "My gas supply has been cut off". However, if I do that, it does not recognise the intent. I have to at this point re-enter the phrase "Your service is really bad" to get it to register the "negative-sentiment" context, then I can move on.
What does work, is if I start with a DM stating "Your service is really bad", followed by "My gas supply has been cut off". It's almost as if clicking on the reply to tweet either forgets the context or its actually a different DF session that is created once we fall into the DM.
So, has anyone seen this behaviour before? Thank you in advance for your replies.

When you attempt to switch from #mentions to DMs on Twitter keep in mind the sessions don't carry over (they are separate sessions) so what you'll need to do going forward is keep track of usernames on the backend in order to connect the two distinct sessions.

Related

Telegram geolocation

I have an idea to use a telegram bot for food ordering from a smartphone. So, you have a menu, prices, there is a payment gateway. This part seems clear to me.
I was wondering if there any way to get a geolocation information inside telegram? So smartphone owner location is sent automatically.
The alternative I see are:
writing address thru telegram (too much work and probably restaurant has to call back);
Install a small Android/iOS app just to send a location to the service. Kinda feels awkward, but a little better that first option.
Maybe you can see better ways, perhaps telegram already got some related functionality?
Thank you!
On some step (don't do it too early) you can send a button with the request_location field set to true.
When the user presses that button, Telegram asks the user if he wants to share his location with the bot.
The user then sends a location. Note that the user could also spoof the location.

Having a user click a link in a Slack Incoming Webhook Message and getting their response

I'm looking to have a user type something like
/makemeeting today # 4:00pm
this fires a outgoing webhook, which stores the info, then it fires a incoming webhook which would display a message in a channel saying meeting scheduled, and have two links
yes | no
Here's where I'm stuck. I can do everything up till this point. I'd love for any user to be able to click on one of those links and have it perform another outgoing webhook with the proper response.
I know I can just make those links point to a website, but I'd love to keep it all within slack without having to open a browser.
Is this possible? I swear I've seen yes|no, true|false replies before in other commands and bots, but I might be imagining that.
Any help would be appreciated...
thanks
This isn't supported yet but is on Slack's roadmap for the "near term".
https://trello.com/c/DVrJLbxX/12-interactive-messages
A work around is to add reactions to your message. When the user clicks the reaction (to bump up its count), an RTM event will be dispatched for you to handle: https://api.slack.com/events/reaction_added
An live example can be seen with the Meekan calendar app: https://meekan.com/slack/
So you could have two reactions: thumbs up and a thumbs down. And handle which reaction the user clicked.

Inviting users to an IOS app

After registration, our app prompts users to invite her friends (aka phone contacts) to use the app too. This allows us to send an email/sms to the useer's contacts with some sort of invitation key. Works fine for a web version app, just embed the key in the url you provide in the invitation.
I'm having trouble figuring out how to make this work smoothly with IOS only. It would be brilliant if I could send the invitee a link to appstore.apple.com/myapp?registrationKey=abcXYZ and have the key magically available to my app once it's installed, but I guess this is a lot to hope for?
The obvious way around this is to make the user manually enter their registration key on first launch, but this seems less reliable and (to my mind) adds friction to the UX.
Has anybody come up with something clever to get around this?
Here is what is flowing through my brain on how to solve this solution, please note, I have not vetted, psudeo-coded, coded, or applied this theory.
Since you will know who is being sent an invitation, save that data to your database with a relationship to the user sending and a unique id to the user being invited (email address if its in the contact's card). When new users sign up scan the database for invitations, if one is found present it to the user asking We're you referred by <existing user>? Once the new user selects their response continue through the registration process, updating the relationship table accordingly and applying any extra settings you need to for the referral.
This combines automatic referral tracking with referral codes for a basic, straight-forward, almost (but not quite) fool proof method to make sure referrals are linked to the right users.
As far as I can tell, the App Store provides an information firewall between an invitation and the installed app.
The closest workaround I've seen is the following:
email link sends you to your website
the website logs reference information in the URL and the IP address
the website instantly redirects you to the App Store (if iOS detected)
user installs the app
user loads the app
app contacts your website, IP addresses matched ... BINGO
Obviously not a secure method though.
There are many failure cases:
business networks commonly share IPs
home and mobile networks release and reuse IPs
The more is frequently used to resolve cases where its good enough to know that the user 'almost-certainly' was referred to download app by the email.
For example, it can be a good mechanism to prompt the user with a "who do you know" question in an app and limit the options based on the (IP+reference) data. If they pick the original poster, then maybe that's good enough, and then you can attach any other data that the inviter provided.
(Full disclosure, currently work at Branch)
The best solution to this is to fingerprint a user. This requires you to do the following steps:
For each user, using your own domain, generate a link for said user. So, right when they complete registration, generate their unique URL, that contains the invitation key.
For anyone clicking this link, they will redirect to Safari first. When they do, capture their IP address and iOS operating system version from the headers and user-agent.
Save this data on your server, and set window.location to your iTunes url.
If the user downloads and consequently opens, inside AppDelegate.m, send a message to your server with the IP address + major/minor/min version you collect upon app launch. If it matches with what you have on the server, you can now pass that invitation key back to the new user.
It's not perfect, and has the ability to misattribute. You could also use branch.io, where all of this is taken care of (link-generation, fingerprinting a user, attribution). Branch also drops a first party cookie and ties it with the device level ID, so attributions are much more accurate.

Facebook: "URL could not be liked because it has been blocked" error in iOS app

I'm working on an iOS app that allows the user to like a Facebook page within the app. I've implemented this using FacebookLikeView. During the course of testing this functionality, I've liked and unliked the same page multiple times. Unfortunately, this seems to have triggered Facebook's spam detection. Now, when trying to like a page using the like button displayed by FacebookLikeView, the following error is presented: "URL could not be liked because it has been blocked".
Based on reports of the same problem found by searching the web, I've filled out this form to request that Facebook remove the block. However, I've received no response from them. I'm not sure how to proceed. Has anyone else run into this issue and successfully solved it?
With billions of pieces of content being shared on Facebook every month and bad actors constantly targeting the people who use Facebook, preventing spam isn't easy. Just as a community relies on its citizens to report crime, we rely on you to let us know when you encounter spam, which can be anything from a friend request sent by someone you don't know to a message that includes a link to a malicious website.
From : Explaining Facebook Spam Detection
This is no answer and what Donn Lee said is maybe the best answer.
My best guess at this is to send them lot information regarding you testing the app rather than abusing the system. You could try screenshots, contact info and explain what you are testing it for.
Try : Facebook Help Center
Developer Help : Rate Limits, Restrictions and Disables
Try filing a bug on the Facebook Developers Bugreporter.
If it's been a week and the site is still blocked, submit your site on this form.
if it comes down to no other option, there is also unrelated contact info on Facebook Newsroom, including the e-mail address press#fb.com.

Posting message to multiple walls does not work

I'm developing some application for the Facebook and iPhone.
User of our application would like to send to his friends notifications (only friends not other people), such as normal message. But the problem is that it’s the same message such as: "I would like to invite you to a party on Saturday". Posting one message works, but I encountered a problem when I post more messages at once. I do believe that this have to be some anti-spam filter or some other mechanism that is prohibiting posting messages in batch to walls of friends. I’m using Graph API for posting. Can somebody explain me or lead to some link how exactly this works and more importantly how to avoid this in my application…? Is it possible by paying some fee/credits to Facebook to allow my users to post messages to friends as they would like or this is simply not possible?
Just one important note: this is not a spam software and my user does not send wall messages (or notifications) to other people, only his selected friends and for sure the user is aware about this and the message is sent after user confirmation. Maybe I miss something, some application privilege?
Thank you in advance.
Marcin

Resources