Twilio send SMS with Google Maps "Pin" - javascript

There's a feature on smartphones where you can send someone a "pin" of where you're at or another location. This can be on Google Maps, Apple Maps, etc..
On the messaging side..this shows up as a 'preview' of the pin that's clickable and will then launch the respective maps app.
How can I send said "pin" through Twilio?
I noticed the format of these pin urls looks like
https://maps.app.goo.gl/9s8sdsiuGPitgT6?g_st=ic
Note the maps.app part. I thought this is what would make the preview work.
I tried that with Twilio and it just results in sending over a hyperlink. (Opening up the hyperlink does usually open up the respective app on the phone. That's fine..but I'm really tryna get the preview to show up too)
Is this even possible with Twilio? Is this something I'd need to use the MMS API for?
Note: I'm using a Twilio Serverless function with JS to achieve this.
Thanks!

I have an app built on Twilio and send URLs frequently. To my understanding - the link preview feature is dependent on the device receiving the message. Here is an overview from Twilio that explains how link previews work.
As an alternative - you might check out what3words as an option for sending location info. We needed to send very specific meeting locations to people and this helped. Sending a general address was never specific enough - and this let you save a very specific location and share it with others.
Hope this helps!

Related

How can I find the API that a website uses?

I have a small personal project which consists of grouping several data from several websites in order to have them all in the same place. Because of this, I use BeautifulSoup with Flask to be able to scrape the data.
However, I wish I could do the same for the following site: https://cartographie.ville.terrebonne.qc.ca/patin-exterieur/
but it's an interactive map and I can't take the information from each popup when clicking on a skate. After reading about it, I've come to the conclusion that the website in question must be using an API to display their data so I could be able to parse the datas, but navigating through Google chrome's developer mode I can't seem to find the correct api where all the data is stored. Does someone have any ideas?
In Chrome DevTools "Fetch/XHR" tab, you can see new API requests as you move the map around. Looks like the API response is application/x-protobuf, which is most likely a binary data response that you would need to parse.
They are using https://developers.arcgis.com/javascript/latest/maps-and-views/
Which is part of Esri. A big machine learning data science service.
You wont get far with this to be honest as you wont get any authorization.
You can go through the website and press F12, then go to the Network part and Headers look for "Request Headers"

YouTube Data API v3 Request Only

I just want to request my viewCount, subscriberCount and videoCount. All these three things are listed when I open this url in my browser.
I am working with JavaScript. All I want to do now is save this three variables and display them on my website. No authentication is needed.
I tried a lot of code examples but it never worked. I have no idea how this works. Please help me!
if you look in the reason of the invalid request it tells you that a key is needed.
In fact, as almost all the google API services nowadays, you need to register your application and get an API key that will replace the value of the parameter key in your url (Now it is set as a demonstration as key=MY_API_KEY).
Here is the link for the guide to app google registration.
Hope this answer can be useful to you.

Link to pop of version of gmail message with javascript

I'm working on integrating gmail into an in house application so on a users dashboard they see the 10 newest emails with in their gmail account. I'm pulling in the emails using fsockopen and issue imap commands.
I've gotten the url to direct link to the message that looks something like this: https://mail.google.com/mail/u/0/#inbox/13e2b4235af0b71a
However in a pop up that still contains all of gmails regular interface. What I'd like to be able to do is from the link in our system pop up the gmail pop up version (if you click the "in new window" button within gmail). See below for the gmail pop up I'd like to direct link to.
edit: For those wondering. No grabbing the url from the bar and changing the thread id (th=) doesn't work.
Building it like this makes the application very dependent of Google. If they decide to work something else out as it works faster you need to rethink your hack.
I'd strongly recommend to use a more Generic approach.
Either using the GMAiL API: https://developers.google.com/google-apps/gmail/
Or using SMTP/IMAP/POP commands to the GMail server.
Good Luck!

Facebook: Posting multiple links using graph API (javascript sdk)

My requirement is in such a way that when the user clicks on the button, content similar as below has to be posted on the user's wall from our site.
Sample Sharing Content
I like the following pages in xyz.com
1. link 1
2. link 2
3. link 3
4. link 4
Is this achievable through facebook graph API[javascript sdk]? If so how can it be done?
EDIT
Currently I am able to do the above but I wanna share a link with a clickable text and url. For example instead of displaying http://www.google.com, I want to display Google as the url text.
Instead of having this http://www.google.com, I wanna do this Google
Can that be done? Is it possible through API?
Yes, it is possible. You first have to register an app on Facebook. Then you create a login for the user with the right permissions. And finally, you make an Api call to publish your content to their wall.
Registering app & login: http://developers.facebook.com/docs/howtos/login/getting-started/
Api call: http://developers.facebook.com/docs/reference/javascript/FB.api/
Let me know if you have any questions..
I think you want something like collections. Take a look at this example image.
This cannot be done in an quick way. You need to fiddle around with the open graph and its actions. This might be a lot to do at first, but the results are very nice (as the different screenshots/app examples demonstrate). The docs are quite good on the basics and there are plenty of ressources on how to archive advaned stuff. But the basics should be enough for a simple link list. Note that this is not just result in "regular" wall post but a collection of links in the users profile, that can also appear on his wall.
You cannot just use "vanilla HTML" to post these collections of link like you want to since it is neither supported, proposes good security not UX compatible.

Creating a facebook likebox

A client of mine (a design studio) asked me to style the like-box social plugin on their site.
As far as I know this cannot be done now with the deprecation of "css" parameter on the fbml tag.
So the route I have to take is to recreate the like-box myself using the js SDK (or php SDK), but the problem is that I cannot find the users (and their photos) that like my page. I'm searching through the opengraph explorers parameters but i cannot find anything.
Does anyone know which url I must follow in the graph api to get what I want?
Do I have to have an access token for such an action? I noticed that the likebox plugin works event if you don't have a facebook account (It shows pictures).
Thank you.
You can't recreate the like box on your own. The Facebook APIs will not return a list of users who like your object. This was done to stop people from getting user lists of likers and spamming them.
Currently, you can only query to find if a specific, authenticated user or which of their friends likes your object.
You could build something similar by populating your fake like box with images of recent posters. You would need to deal with filtering out duplicates, and the page posting as itself, but this should get you started: /PAGE_ID/feed?fields=from.name,from.picture&limit=10
You will need an access_token to get this data. I'd authenticate as an app to do it.

Categories