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?
Asked
Active
Viewed 502 times
1

Stéphane Bruckert
- 21,706
- 14
- 92
- 130

RyanN
- 65
- 3
1 Answers
1
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).

Community
- 1
- 1

Stéphane Bruckert
- 21,706
- 14
- 92
- 130
-
Thanks for the feedback, too bad I can't do it in the query. I'll have to implement that. Although, I just tested something out, and it seems as though the Graph API isn't returning my public post with the unmasked word in it. I'm assuming Facebook doesn't index everyone's public posts and this could be the issue? – RyanN Oct 25 '13 at 14:51
-
What makes you say that? I think it does, though I didn't prove it. I could find the "unmasked" word in some posts. – Stéphane Bruckert Oct 25 '13 at 15:01
-
Using https://developers.facebook.com/tools/explorer?method=GET&path=search%3Fq%3Dunmasked%26type%3Dpost I don't see any with unmasked in the content. Mind you, if I search for unmaskedment I find some with unmasked, probably because of how the stemmer works. – RyanN Oct 25 '13 at 16:17