7

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);
ekad
  • 14,436
  • 26
  • 44
  • 46
A. R. Jones
  • 73
  • 1
  • 5

1 Answers1

13

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.

Tobi
  • 31,405
  • 8
  • 58
  • 90