简体   繁体   English

就像使用Facebook PHP SDK的Facebook Page

[英]Like a Facebook Page using Facebook PHP SDK

I need to put a custom image for F Like. 我需要为F Like放置一个自定义图像。 But it seems the only way to do it is by using Facebook APP, asking users permission and liking it via PHP SDK. 但这似乎是唯一的方法,就是使用Facebook APP,征求用户许可并通过PHP SDK喜欢它。

The last part is the one that does not work for me. 最后一部分是对我不起作用的部分。 Permission granted by user is "publish_actions" and "user_likes" (user_likes is just to know whether the user has already liked the page or not which works fine) 用户授予的权限是“ publish_actions”和“ user_likes”(user_likes只是为了知道用户是否已经喜欢该页面,效果很好)

The code that I am trying to debug is. 我要调试的代码是。

$facebook->api('/me/likes', 'post', array('url'=>'<URL to Facebook page>'));

Any thoughts? 有什么想法吗? I have tried enough searches and read forums, but can't find answer to "Is it possible or not" and if it is where am I wrong 我已经尝试了足够的搜索并阅读了论坛,但是找不到“是否可以”的答案,如果我在哪里,那我错了

The response I am getting is "(#200) App does not have permission to make this call" 我得到的响应是“(#200)应用没有权限进行此呼叫”

In order to publish Like on a Facebook page, you must use Like button social plugin . 为了在Facebook页面上发布“赞”,您必须使用“ 赞”按钮社交插件

One way of publishing Likes on objects is by using Open Graph Like feature . 在对象上发布喜欢的一种方法是使用“ 打开图喜欢”功能 This requires a publish_actions permission and the graph URL looks like: 这需要publish_actions权限,并且图形URL如下所示:

https://graph.facebook.com/[User FB ID]/og.likes
object=OG_OBJECT_URL&access_token=USER_ACCESS_TOKEN

However, this currently doesn't support Facebook Pages. 但是,这目前不支持Facebook Pages。

检查以查看是否已禁用Wheather Facebook访问

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM