-1

Im using Facebook API (https://github.com/facebook/facebook-php-sdk) and im curious if its possible to retrieve details of events of some fan page. But i need to say im not admin of that page. Is it possible in any way?

epix
  • 1
  • 1
  • 1

2 Answers2

3

yes it is possible

run this

SELECT eid FROM event_member WHERE uid = 17414523278

17414523278 is facebook page id

1

Yes, it is possible. If the the page owner has made their event public, you can get it just by initializing the SDK with your app credentials. For instance, this gets all of IKEA USA's events:

require '/path/to/sdk/facebook.php';
$fb = new Facebook(array(
       'appid'=>'YOUR_ID',
       'secret'=>'YOUR_SECRET'
      ) );
$page_events = $fb->api('/ikeausa/events', 'GET');
printf ('<pre>%s</pre>', $page_events);

If the page owner has restricted their site in any way (age, country, etc.), you need to authenticate a user into your app who meets the page's restrictions before you can see that page's events. Replacing ikeausa with makersmark in the above code will return an error since Maker's Mark has an age-restricted page.

cpilko
  • 11,792
  • 2
  • 31
  • 45