Whole Word Search using Graph API? [duplicate] - facebook

This question already has answers here:
Using the Facebook Graph API to search for an exact string
(2 answers)
Closed 9 years ago.
I'm using the Graph API, but it's returning results I'm not looking for. I'm using /search?q=unmasked&type=post, but it's actually returning posts that contain unmask. I want to do a whole word search, but the Graph API seems to be stemming the search terms. Is there a way around this?

As far as I know, there is no way to search for exact expressions like you will be able to do on Google using double quotes: "To be or not to be".
Facebook intentionally implemented an algorithm to find similar words and help users to find relevant information.
But you won't be able to transcend it at the API level.
The only thing you can do, is to write a filter in your own language that checks in each returned post that "unmasked" is indeed included.
Edit: just saw that a duplicate question exists, you can get inspired from it (Using the Facebook Graph API to search for an exact string).

Related

search by substring in flutter with bloc [duplicate]

This question already has answers here:
Google Firestore: Query on substring of a property value (text search)
(25 answers)
Closed 2 years ago.
I store data in firestore and I want to query it using substrings. How can I perform a search with BLoC in flutter? I'm using Firestore and I need to search some items by substring from it.
I fail to understand how to properly perform a search. Could you share me some links with guides or examples?
I've found this article that explains how to request Firestore from flutter using the BLoC pattern. It's explained step by step and you will be able to reproduce it in order to understand the whole process.
You will also be introduced to "collections" and "documents", things that you should know when querying your database. Bear in mind that as stated in this answer you will not be able to filter just with the request, so you will have to request all the documents and filter them on your app.

Google manual search results do not match Custom Search API results

I am trying to obtain the total result count from manual Google web search via the CustomSearch API. I am searching the entire web based on a keyword and an associated site, so the search query is " site:". Judging by my research, it is a known issue that manual Google search results tend to differ from CustomSearch API results obtained from searching the entire web, as cited here and elsewhere.
Is there really no way to exactly reproduce manual search results with the API? If that is the case, then the API is rather limited and should be explained up-front to developers in the documentation or fixed.
My custom search engine is already set up to search the whole web I believe.
It looks like maybe PDF files returned in a web search are not returned by the API. I have already tried specifying fileType parameter to include PDFs to no avail.
3 Results returned via manual web search.
0 results returned by API.
If anyone has lessons to share I will be thankful!

Facebook api search without keyword

I'm working on an application that searches for events near you. I need to search everything of type event from a specific date to another one. So I use this graph API query:
search?q=cluj&type=event&since=2015-12-05&until=2015-12-06&city=Cluj-Napoca
Now the problem is the q= thing is annoying me more than helping since I don't get all the events cause I'm missing a keyword.
Now the question is how can I search for all events between those 2 dates since I need to have something there at all time?
The Graph API doesn't support such queries. But you can have a look at
https://github.com/tobilg/facebook-events-by-location
which uses a combined approach (Place search by location & events lookup by returned places).

StockTwits API Streaming and Search Used Like Twitter Streaming

The StockTwits API documentation describes steams in a way that sounds like static search results, for example streams/symbol:
This allows an API application to search for a symbol or user. 30 Results will be a
combined list of symbols and users.
This seems similar to search/symbols:
This allows an API application to search for a symbol directly. 30 Results will return
only ticker symbols.
Other than the fact that search excludes users, I don't see the difference.
In contrast, the Twitter API provides methods to request a continuous stream of tweets, which I have gotten to provide tens of thousands of tweets in a few days.
Is it possible to have StockTwit pump tweets continuously, similar to Twitter?
If so, what is required? Since StockTwit streaming looks like searching to me, the only option I have seen is to submit repeated search requests, but that would exhaust the rate limit.
I prefer C#, but I am glad to study answers in other languages, such as PHP.
This is a static search for symbols or both symbols and users as a combined search. This isn't a streaming search endpoint for filtering content. This is strictly for use for finding a symbol or a user to go directly to the stream.
We are looking into offering streaming endpoints and search would be part of this offering.
You may be interested in using streamdata.io which allows to stream any APIs. We have already implemented a StockTwits demo, which can be found here and explanations can be found in this blog post.
I think it's quite easy to transpose what has been done with Android to the C# world. All you need is an EventSource library and a JSON-Patch library.

How can I fetch more than 1000 Google results with the Perl Google API?

HUsing the regular search engine, as a human, can get you not more than 1000 results, which is far more than a regular person needs.
But what If I do want to get 2000? is it possible? I read that it is possible using the App Engine or something like that (over here...), but, is it possible, somehow, to do it through Perl?
I don't know a way around this limit, other than to use a series of refined searches versus one general search.
For example instead of just "Tim Medora", I might search for myself by:
Search #1: "Tim Medora Phoenix"
Search #2: "Tim Medora Boston"
Search #3: "Tim Medora Canada"
However, if you are trying to use Google to search a particular site, you may be able to read that site's Google sitemaps.
For example, www.linkedin.com exposes all 80 million+ users/businesses via a series of nested sitemap XML files: http://www.linkedin.com/sitemap.xml.
Using this method, you can crawl a specific site quite easily with your own search algorithm if they have good Google sitemaps.
Of course, I am in no way suggesting that you exploit a sitemap for illegal/unfriendly purposes.