php - Get events from Facebook user logged to website through SocialPlugin oneall.com -


i'm developing wordpress website. made login users socialplugin (with oneall.com service). great! however, want events facebook users logged website (events created user or other friends). have found many example using facebook sdk php, empty array().

so, think there trouble using appid , secretid used login website through oneall.com service.

i've used code:

global $current_user; get_currentuserinfo();  $userurl = $current_user->user_url;  $graphuserurl = str_replace("www","graph",$userurl); $fbuserdata = json_decode(file_get_contents($graphuserurl,0,null,null));  //print_r($fbuserdata); //echo $fbuserdata->id; right userid  $appid = "myappid"; // data used login oneall.com $appsecret = "mysecretid"; // data used login oneall.com  $facebook = new facebook(array(     'appid'  => $appid,     'secret' => $appsecret,     'cookie' => true ));  $fqleventsquery = "select name, pic, start_time, end_time, location, description     event      eid = " . $fbuserdata->id . "      , start_time >= now()      order start_time desc";  $params = array(     'method'=>'fql.query',     'query'=>$fqleventsquery,     'callback'=>'' );  $fqlresults = $facebook->api($params);  print_r($fqlresults); 

in example, empty array(). wrong?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -