Get Facebook fan page ID

前端 未结 9 1695
名媛妹妹
名媛妹妹 2021-02-04 08:32

I\'ve got the Facebook user ID of the user who created a given page. Now I need to get the page ID to display like box in my website.

Different users have their own Face

9条回答
  •  温柔的废话
    2021-02-04 09:13

    this works using the new php sdk

    $page_id = null;
    $facebook = new Facebook();
    try {
        $signed_request = $facebook->getSignedRequest();
        $page_id = $signed_request['profile_id'];
    } catch (FacebookApiException $e) {
        error_log($e);
    }
    

    please note that i'm upset that this works, because what i'm actually looking for is the user id of the page creator since I need to display content created by that user on the tab. this used to be possible, but i don't think it is anymore. kasun, how are you getting the id of the page creator?

提交回复
热议问题