1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Checking if user liked page only works for app admins

Discussion in 'Facebook API' started by TimVN, Apr 7, 2013.

  1. #1
    Hello,

    I'm trying to check if a user liked a certain page, I have tried several methods and I'm going with the pages.isFan method now. The only problem is that it only returns true for me. (The app creator) When a friend tries it, I always get a 0 AKA false.

    When getting a login url I'm asking for the 'user_likes' permission like this:
    $params = array('req_perms' => 'user_likes');
     
    $url = $facebook->getLoginUrl($params);
    Code (markup):
    Is this correct? Because when I click the link, it does send me to my 'app', but it doesn't say anything about the app trying to get permission to check what pages you've 'liked'.

    As for the method (pages.isFan) I'm using:
    $liked = $facebook->api(array(
    "method"    => "pages.isFan",
    "page_id"   => $array->id,
    "uid"       => $uid,
    ));
    Code (markup):
    And $liked should contain a boolean telling me wether the user liked the page or not.

    1. We are sure he gave my app permission.
    2. If I change the permissions of my app, do the users get a new link to authorize me?


    Thanks in advance!

    - Tim

    ps. Sorry for any spelling/grammar mistakes, I'm Dutch.
     
    TimVN, Apr 7, 2013 IP