facebook - unable to get fan page to check if user has liked this page or not using fql -


i want know whether user has liked page or not , following code:

    function checkpagelike($fbuid,$token){     $fqlquery = "select uid page_fan page_id = ".$this->config->item('pageid')." , uid=".$fbuid;     $res = "0";     try{          $ret_obj = $this->facebook->api(array('method' => 'fql.query',                 'query' => $fqlquery,         ),'get',array('access_token' => $token));         if(checkarray($ret_obj ) && $ret_obj [0]['uid']){             $res = "1";         }     }catch(exception $e){         print_r($e);     }     return $res;  } 

so using code able check if our page in liked user or not. , working. 1 of qa did thing different may didn't gave permissions first time, gave permissions, installed app. , our above code wasn't able if user has liked page or not. user removed app. again installed same problem. logged in different machine still our above code not able if user has liked page. want know why can such problem happened? problem of app permissions? user settings? or using wrong way check if user has liked page? why fql not able tell if user has liked page or not?if our page in fan pages of user or not? working fine other users. ambiguous please tell if guys have idea?

thanks in advance guys.

here notes:

  1. you should using graph api user likes connection instead of fql: /profile_id/likes/page_id
  2. make sure have user_likes permission
  3. check answer above
  4. if trying build fan-gate don't need user authorization facebook send "fan" status of user when landing on page tab. see here

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -