簡體   English   中英

為什么$ facebook-> getUser()返回0?

[英]why $facebook->getUser() return 0?

我的代碼是

include_once "fbaccess.php";

  $user_id = $facebook->getUser();
  var_dump($user_id); 
  var_dump($facebook);

結果:-

int(0)       // Why $user_id return zero

object(Facebook)#1 (7) { 
      ["appId":protected]=> string(15) "4545454" 
      ["appSecret":protected]=> string(32) "323232" 
      ["user":protected]=> int(0) 
      ["signedRequest":protected]=> NULL 
      ["state":protected]=> string(32) "c8d6e657da34596785b06e7511921529" 
      ["accessToken":protected]=> string(48) "{APP_SECRET}" 
      ["fileUploadSupport":protected]=> bool(false) }

請幫我。 我錯過了哪件事????

看看https://developers.facebook.com/docs/php/gettingstarted並堅持給定的示例。 您發布的代碼不完整,因此無法正常工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM