How do you get the contact information for a Foursquare user who checks in to your venue via 4sq's API? - api

I am currently writing an application as the owner of a particular venue. I want to be able to programmatically reach out to a user who checks in to the location via the contact information associated with their Foursquare account (if they've chosen to make that information public).
Based on the sample code provided with the Real-Time API, it doesn't look like contact information is returned here. Is there a way to crawl to the necessary info from the info returned via this endpoint?

You generally ought to actually be able to get the email from the actual push API response. Inside the user object should be a contact object, and the email field will be populated with their email. You can always also fall back to making a user details call to retrieve a user's contact info once you know their user ID.
However, please keep in mind our API platform policy when it comes to situations like this. From the policy: "You must not take any action that constitutes unauthorized or unsolicited advertising, junk or bulk e-mail."

Related

(ssg-wsg) Why is CorpPass ID required for Update/Delete course run with sessions API?

Does anyone know why is CorpPass Id a required field for "Update/Delete course run with sessions" API? Since this will be an NRIC, would it be a sensitive information to be used in the request body?
Referring to the API: https://developer.ssg-wsg.gov.sg/webapp/docs/product/6kYpfJEWVb7NyYVVHvUmHi/group/374zmR5D0tQeS87eA1hrLV/api/4i96CWAYWH6uGhkhGMZxHd/version/3egIPKn3WK27liSToemjDV
Based on the API page, I do not see where Corppass ID is being referenced. Do provide more details if you have a technical query for the API.
However, based on the description: API is only available to Corppass users - and if you are able to subscribe to it then you are a Corporate Developer. For this query, it would be more appropriate if you can reach out to their servicedesk for details instead: https://developer.ssg-wsg.gov.sg/webapp/faq?anchor=WhoCanIContactIfIHaveQuestionsAboutTheseAPIs

how to get the names of non-contact member in a skype group conversation?

I want to know how to get the names of non-friends in multi-person conversation in web.skype.com.
For example: in a multi-person conversation, there is a user A who is not my contact, but the web.skype web page can display the name of user A. Through Chrome's network tools, I am only getting a conversation history message record request I have seen the name of user A, but if user A has not sent a message, all the data obtained by request does not contain the name of user A.
If anyone knows and tells me how to get it, I would appreciate it
Skype dont provide an API who can do that, you need to implement a bot to give you this information.

Using Instagram's Graph API, how can I retrieve post data (media url, caption, poster username, etc)

I want to use Instagram's Graph API on my backend server to retrieve data about an Instagram post. On my frontend, users will submit a post URL (like https://www.instagram.com/p/CAvPIm2lszQ/). Then on my backend, I want to take the ID of the post from that URL (so in this case CAvPIm2lszQ) and then I'm hoping that I can pass that ID thru the Instagram Graph API and then retrieve the data that I need (media URL, caption, poster username, etc.).
So would that be possible? I did find documentation on "IG Media" for the Graph API, but under permissions, it says, "A Facebook User access token from a User who created the IG Media object, with the following permissions.."
Unless I'm misunderstanding it, I'm not sure if I'll be able to access posts from various public accounts. I think it's also worth mentioning that my users are not logging into their Instagram accounts to use my service so the only possible "User access token" would be my own.
Any ideas on how I can go about this? I was using the instagram.com/p/{post_id}/?__a=1 endpoint to meet my needs before but it doesn't work on my production server for some reason. So I'm kinda stuck.
Most probably you will not be able to achieve that using Instagram API. First of all the ID you are referring to CAvPIm2lszQ is not the ID that you will use for getting IG Media. The ID is different (it's numeric value like in the sample request from the page you've linked). The full URL that includes CAvPIm2lszQ is in the shortcode field.
At the moment it is not possible to look for the post detail using shortcode. If you want to use that endpoint you need to get the real post ID first, for instance by listing list of posts from given user.
But in order to do so - you need to use Facebook login authorization window to get token from given user. Alternatively you can try to request https://developers.facebook.com/docs/instagram-api/guides/business-discovery but it requires going through App review and having your own company to pass the Business Verification. Keep in mind that this endpoint returns information only about Instagram Professional accounts (Business/Creator account). You will not be able to get information about regular accounts.
And the last thing about ?__a=1 endpoint. This is not the official Instagram API. They use it only for their own purposes. Most probably your server IP address has been blocked due to sending too many requests.

Identify unique user in Dialogflow V1

So I am testing out Dialogflow and one of the first questions I have is: how does my bot know who it is talking to? I need to identify a user and keep that information for as long as I can. The basic scenario being:
User starts his/her first conversation.
Chatbot send a fulfillment request to the server trying to match a user within its own database.
The user is found, the information (as a JWT or some other token) is sent back to Dialogflow and stored there for further communication. In reality, this part would involve asking for user email, sending a verification code to that email and then verifying the user with the code.
User then starts chatting with a bot and all fulfillment requests get the unique token stored for this very user, so that my REST API knows which user is being served with the response.
Couldn't find anything about it in the docs (maybe I am looking in the wrong places).
There will be several integrations, like Messenger, Viber, Telegram. I dunno, maybe those APIs add some unique information on the user?...
Thanks for the help!
Sorry, I know it's been a while, but maybe this will help someone else.
The right solution here is a user id, not a session id. A user id is provided by the chat platform (Facebook, Slack etc) and is consistent across sessions for the same user.
To get the user id, go to the Fulfillment tab, enable the editor and use a function like so:
let r = request.body.originalDetectIntentRequest
//this makes sure that you're on an integration
if (r["source"]){
return r.payload.data.sender.id;
}
To tie together ids from different platforms, you probably have to have some kind of log-in process every time you encounter a new id on a platform.
Pop,
Sessions are built in already into DialogFlow requests to your fulfilment service, if you check the payload you will find a sessionId, it remains the same for the same client until it expires.
However if you want to identify the user from any of the clients that you can connect to DialogFlow like Messenger then from the same request payload to you you will notice that there is an object named originalRequest that is only available when requests are coming from those clients.
You can personalize those users response eg using their FB firstname in a message to them.

How to make authorize request with Google Plus Social Graph

I am working on PHP application, which communicates with Google Plus. For getting information about people in circles I send request to this link: https://plus.google.com/u/0/_/socialgraph/lookup/visible?o=%5Bnull,null,%22GOOGLE_USER_ID%22%5D&rt=j and it retrieves me list of people in circles for specific user.
In my application I want to check for each user in my friend list (person in circle), if he/she has me also in circles, which means we are friends. But if person has blocked to list people in circles for public, then I get empty array in response despite he/she is my friend. So I would like to know, how to send with this link authorized request. For example how to include there access token.
Because now it shows only public data and it acts like I am not logged in.
Use: https://developers.google.com/+/api/latest/people/list and ask the user to sign-in then you'll be able to get their consent and retrieve the list of people they're following.