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:
Comments
Post a Comment