I have been testing the Facebook php sdk. I am able to search for pages & places but not groups. According to the documentation, this should return groups...
https://graph.facebook.com/search?q=programming&type=group
The below code works. If I change the type from "page" to "group", the code fails. I do not get an exception:
$query = urlencode('Harlem');
$type = 'page';
$results = $facebook->api('/search?q='.$query.'&type='.$type);
It depends on what kind of Access Token you're using. As of https://developers.facebook.com/docs/reference/api/search/#access_tokens searches for pages require an App Access Token, whereas searches for Groups require an User Access Token. Please check accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With