加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 如何使用Facebook SDK API“赞”页面/网址?

发布时间:2020-12-13 17:10:24 所属栏目:PHP教程 来源:网络整理
导读:我正在使用此代码: $facebook-api('/me/likes/','post',array('url' = 'http://www.google.com')); 我收到以下错误: Fatal error: Uncaught OAuthException: (#200) App does not have permission to make this call thrown in 范围(权限)是: 'scope' = '
我正在使用此代码:

$facebook->api('/me/likes/','post',array('url' => 'http://www.google.com'));

我收到以下错误:

Fatal error: Uncaught OAuthException: (#200) App does not have permission to make this call thrown in

范围(权限)是:

'scope' => 'publish_stream,email'

解决方法

唯一可以通过编程方式喜欢的是带有喜欢连接的facebook Objects.

摘自https://developers.facebook.com/docs/reference/api/:

You can comment on or like any object that has a /comments or /likes
connection by posting to 07001
and 07002

更新:

用户对象也具有喜欢的连接,但是用于聚合其他对象的喜欢,不可能“喜欢”用户. (谢天谢地; P)感谢@Juicy Scripter指出这一点……

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读