dsa122870 2013-08-29 17:30
浏览 137

我总是得到:“提供的appsecret_proof无效”

I know that in the last update of Facebook API, there exists the possibility of provide a appsecret_proof that is the access token signed with the app_secret.

Now the problem is that, irregardless of the option that I set on my facebook app (enable\disable : Require AppSecret Proof for Server API calls) I always get:

Invalid appsecret_proof provided in the API argument

I discovered that last version of php-facebook-sdk always inserts between parameters appsecret_proof

...
if (isset($params['access_token'])) {
    $params['appsecret_proof'] = $this->getAppSecretProof($params['access_token']);
}
...
protected function getAppSecretProof($access_token) {
    return hash_hmac('sha256', $access_token, $this->getAppSecret());
}
...

If I disable the check on my app, and comment the line that inserts the parameter, everything works fine, otherwise I get the error.

Now, where am I wrong? I triple checked $access_token, $this->getAppSecret() and the doc, all seem correct. Any clues?

  • 写回答

2条回答 默认 最新

  • dth8312 2013-09-15 16:10
    关注

    I was finally able to get rid of the error by just granting permissions to everything.

    评论

报告相同问题?

悬赏问题

  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?