发布到其他用户墙壁从Facebook api [英] Post to other users wall from facebook api

查看:117
本文介绍了发布到其他用户墙壁从Facebook api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个允许用户销售商品的网站,登录是基于Facebook API。
创建广告时,需要被批准,因此在创建时不可见。
我有一个字段,用户可以检查他/她是否允许将新广告发布到他/她的Facebook个人资料。这样做完美,因为它发布很好,但这里的问题是广告不可见



我的问题是如果可以将这些东西发布到另一个用户的墙上通过API。



代码现在是

  define(' APP_ID','XXXX'); 
define('APP_SECRET','XXXXX');

$ facebook = new Facebook(array(
'appId'=> APP_ID,
'secret'=> APP_SECRET
));

$ facebook-> api('/ me / feed','post',array(
'link'=>'www.XXXX.dk/viewad.php?aid ='。$ id,
'name'=> $ _POST [headline],
'message'=>'我在www.XXXX.dk上创建了一个新广告)) ;

广告获得批准后,这是否有效?

  $ facebook-> api('/ 12345678 / feed','post',array(
'link'=>'www.XXXX.dk/ viewad.php?aid ='。$ id,
'name'=> $ _POST [headline],
'message'=>'我在www.XXXX上创建了一个新广告没有自动跳转'));


解决方案

不,从2013年2月开始您不能再通过API发布到其他人的墙壁(您只能使用Feed对话框,并让用户触发后客户端而他们想要做的就是这个改变的原因 - 把广告发贴到别人的墙上是我会考虑的。是纯垃圾邮件(如果FB的平台政策允许您的商业模式也是有问题的,我想。)


I am creating a site that allow users to sell items, login is based on the facebook API. When an ad is created it needs to be approved, so it is not visible at the time of creation. I have a field where the user can check whether he/she will allow the new advert to be published to his/hers facebook profile. This works perfect as it publish just fine, but the problem here is that the advert is not visible

My question is if it is possible to post such things to another user's wall through the API.

The code now is

define('APP_ID', 'XXXX');
define('APP_SECRET', 'XXXXX');

$facebook = new Facebook(array(
        'appId' => APP_ID,
        'secret' => APP_SECRET
));

$facebook->api('/me/feed', 'post', array(
       'link' => 'www.XXXX.dk/viewad.php?aid='.$id,
       'name' => $_POST["headline"],
       'message' => 'I have created a new ad on www.XXXX.dk'));

Will this work when the ad is being approved?

$facebook->api('/12345678/feed', 'post', array(
           'link' => 'www.XXXX.dk/viewad.php?aid='.$id,
           'name' => $_POST["headline"],
           'message' => 'I have created a new ad on www.XXXX.dk'));

解决方案

No, since Feb. 2013 you can not post to other people’s walls any more via API (you can only use the feed dialog and have the user trigger the post client-side themselves).

And IMHO what you are trying to do is exactly the reason for this change – posting "adverts" to other people’s walls is what I would consider to be pure spam. (And if FB’s Platform Policies allow your "business model" at all is questionable as well, I think.)

这篇关于发布到其他用户墙壁从Facebook api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆