質問

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top