3
votes

Is there a way to search for 2 keywords in a public post? I want to do a full text search in all public posts. Right now I am doing it as "https://graph.facebook.com/search?q=A+B&type=post&fields=link,message&access_token=<>.
Current Behavior: fetching posts having A or B.
Required Behavior: Fetch post have both A & B.

I have also tried POST method in Graph API Explorer. Please suggest what should I do to get results.

Other things I tried : facebook graph api search rules. But it also seems not working, even when I tried with q=A&q=B. Only second query word is getting searched.

1
I found this link. But it also seems not working, even when I tried with q=A&q=B. Only second query word is getting searched. - Nitish Varshney

1 Answers

0
votes

Use the '|' operator. In your note, 'q=A&q=B' you are reassigning the value of 'q'. The API parses the string set as the value for 'q' and uses the '|' operator to parse between. Either way you will have a tough time finding a lot of results because the 'search/post' API is now deprecated.