質問

I'm trying to fetch all events from a public page. I'm sure that appID and appSecret is correct and i still getting:

Fatal error: Uncaught OAuthException: Invalid OAuth access token signature. thrown in /var/www/Events/facebook/src/base_facebook.php on line 1325    

i've also added the site url to the facebook developer app. i've followed several threads answer, but keep getting same error again and again. What am i doing wrong in order to fetch the event data?

ob_start();

require 'facebook/src/facebook.php';

$fb = new Facebook(array(
       'appid'=>'APPID',
       'secret'=>'APPSECRET'
      ) );

$page_events = $fb->api('/ikeausa/events', 'GET');
printf ('<pre>%s</pre>', $page_events);
役に立ちましたか?

解決

You've asked the same question again! But I noticed a big error this time:

Instead of 'appid' it should be 'appId'. (note the capital I).

But another thing: no event of ikeausa is public, so you'll get an empty array in result. Try following, it will give you an event that is public-

$fb = new Facebook(array(
   'appId'=>'app-id',
   'secret'=>'app-secret'
  ));
$page_events = $fb->api('/Shadowfax.sahil/events', 'GET');
print_r($page_events);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top