Contacts full/free text search - office365api

I have successfully implemented a field search with the use of the $filter parameter as I understood the odata documentation correctly the $search parameter can be used to perform a free text search but the documenation mention something like the service decides what makes an entity complaint with the search critera but I can't find any information about which fields are checked on contact $search. Is it possible to perform a search on the entire contact object or is there some information about the search support for contacts

Are you searching personal contacts (like ../v1.0/me/contacts) or org contacts (../beta/contacts)? I don't think either of these support $search. However, if it's personal contacts, or people you communicate with that you want to search, you should check out the new People API: https://graph.microsoft.io/en-us/docs/api-reference/beta/resources/social_overview. This does support $search. Not sure if this will work for you...

Related

Searching Twitter likes using keyword

The end goal is to exclusively search my own Twitter likes using keywords.
I'm having a hard time figuring out if it's possible via the API and if so, which search that I need (Standard, Premium or Enterprise).
You cannot do it directly. Neither the advanced search nor the premium search API allow you to limit a search to "User's favourites".
The best you can do is get all your favourites using https://api.twitter.com/1.1/favorites/list.json and then search them yourself.

Facebook Search in Graph API

I'm developing an iOS application that let the user to search for a person throught the Graph API.
What I want is the SAME behavior that it's present on the Facebook website. You know when you begin to search for a person in the top text input? The first results will be mostly your friends AND some people you MAY know or people you already looked for.
The problem? Try to use the same search pattern here to search a person: Graph Api Explorer
The Graph Api returns DIFFERENT results than the search input on the Facebook website.
Does anyone knows why? Is there a way to achieve the same results?
Facebook are using many algorithms to display search result like Relevance Indicators, Complexities of User-Centric Search and The Product.
One of the algorithm to display result on their page as below.
Personal Context:
Unlike most search engines, every Facebook search involves two key elements - a query and a querier.
Just as we need to understand the query, it’s as essential to understand the person behind the query.
People are more likely to be looking for things located in their own city/country or for people who share the same college/workplace.
We consider this information and much more when ranking results. The more we know about you, the better your search results will be.
In Graph API, they are not using this algorithm.They are just displaying the queried result. Hence you can not achieve same result using graph search API.
To achieve this you can use following apporach -
Get the friend list of user using me/friends?limit=1&offset=1
Get the user list using search api
merge both the result
show result(s) to user
For more information(approach/algorithm) you can check Intro to Facebook Search
Is there a way to achieve the same results? - NO
Does anyone knows why? - NOT REALLY
(Edit: Seems in another answer, someone does actually, but it doesn't change the answer for "If you can achieve it")
But its safe to presume that Facebook does not allow all functionality through the API, why would they after all ? They need to keep the people coming to their own platform. So I can't give you a straight forward response on WHY, but IF ? Not possible, there is zero documentation about more specified search for type user. When you request user friends, you will only get the user friends who are using the same app starting v2.0
Am afraid that you will have to drop the functionality you want to achieve.
It is not just the graph search. When you refresh your TimeLine. The order of posts gets changed every time because Facebook takes a Pull on Demand approach. Which means whenever you login, the data from your friends is fetched. Which is why facebook has a limit to maximum number of friends.
Talking about the Graph search and Graph API. They are not same and the Graph Search cannot be accessed through the Graph API. So, you would have to change your approach.
To explain why the graph search gives different results on same search term. I would guess that it follows the game Pull on Demand model ( although it is not open and we cannot know for sure ). Following that model makes sense though.
Thanks

ios google api issue

I need to add a very common Google functionality to an iPhone app I am developing. The idea is that the user is presented with a TextBox where he can write an address (i.e.: "Amsterdam av)". The thing is that I want to add some "help" for him, se when he writes a street name, the app will show him a list of partial matches, like google Maps does here:
sample http://www.timotteo.com.ar/google.png
I can´t find the exact class in the google API. It doesn't need to be as fast as google's own search, maybe the user can write "amst" and press a search button, to be presented with a list of partial matches. The API I'm looking for show return in some way a list with posibilities. All I could find for now where method that gives you the lat/long when you feed it with a specific address. Does somebody know what combination of methods/classes I should use? Maybe some example?
Txs in advance!
Perhaps you are looking for the autocomplete feature of the Places API:
https://developers.google.com/maps/documentation/javascript/places#places_autocomplete
This won't autocomplete for all addresses or streets, but rather for businesses, notable landmarks, etc.
If you want autocomplete for street addresses, I do not believe that is available through any documented APIs. That doesn't mean workarounds don't exist, but they may depend on more details about your use case. (For example, if you only care about a narrow geographic area, it may be possible to simply have a list of all the streets in your own database and handle the AJAX call yourself.)
Actully what I was looking for is this:
http://maps.google.com/maps/geo?q=amsterdam%201543&output=xml&oe=utf8&sensor=true&hl=es&gl=ar
That URL returns and XML with all the autocomplete options. All I have to do is parse that XML and voila! There I have my list.

Twitter search for anything from a certain source

The Twitter-search features the possibility to search for a source of tweet by using the parameter "source:" (e.g. source:tweetdeck).
If I just search for that it complains about a missing query, but I actually want to search for any tweets from a certain source.
Is that possible?
You need to have some form of criteria, even if it's just 'recent tweets'. To query every single tweet is, I suspect, not possible at all and certainly not within the capabilities of the API.
Note: My mistake - was thinking of one of the REST APIs.

Twitter Search API: Determining Conversations

Twitter's REST API returns a in_reply_to_status_id value for tweet statuses, yet the Search API does not.
What puzzles me is, if you search using the http://search.twitter.com/ webpage directly, tweets that are in reply to another tweet contain a "Show Conversation" link, but when searching using the API directly, there doesn't seem to be any data suggesting that a conversation exists (with JSON, at least).
How does this search page know which tweets are part of a conversation, and what would be the best way to emulate this behaviour (JSON preferred) in a rate-friendly way? I imagine I would have to do additional calls or something...?
related_results is officially dead along with the v1 API. It appears official Twitter apps use a call to /1.1/conversation/show.json?id=___ as mentioned here https://dev.twitter.com/discussions/17647 however it appears to be blocked from non-Twitter clients.
Just check the JSON field "to_user", which contains screen_name of the #replied person. If its null, you can assume its not a reply. You could also check, if the tweet string starts with a #username, which
http://search.twitter.com/search.json?q=%40aplusk
When you use the search.twitter.com, look for a field name in_reply_to_status_id This contains the original status_id to which this tweet was a reply. Next, there is a currently unsupported/undocument api call to get the whole conversation:
https://api.twitter.com/1/related_results/show/169145505824256000.json?include_entities=1
The value (169145505824256000) is the status_id you want to retrieve the conversation for.
An update on this as I was just faced with the same problem. The Twitter v1.1 API should now return valid in_reply_to_status_id values. But the unsupported v1 related_results has now gone forever.
You can see information about this, and some suggestions about using the streaming API, at https://dev.twitter.com/discussions/11292

Resources