Post to other users wall from facebook api

若如初见. 提交于 2019-11-28 06:41:39

问题


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'));

回答1:


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.)



来源:https://stackoverflow.com/questions/15944285/post-to-other-users-wall-from-facebook-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!