开发者

Posting to my wall instead of others wall FBML Facebook API

for some reason my face开发者_JAVA百科book app is posting to the wall of the user who allowed the app, and not their friends like it's suppose to.

I'm just using a

 $facebook->api_client->stream_publish($message, $target_id); 

Anyone got any ideas?


If you're just starting out, you might find the Graph API and the new PHP SDK to be easier. For example:

<?php

require './facebook.php';

$fb = new Facebook(array(
  'appId'  => 'YOUR APP ID',
  'secret' => 'YOUR API SECRET',
  'cookie' => true, // enable optional cookie support
));
$post = $fb->api("$target_id/feed", 'POST', array('message' => $message));

The various parameters are documented at the bottom here.


Yeah, you aren't using the right method signature. Here it is as copied from my copy of the file

  public function stream_publish(
    $message, $attachment = null, $action_links = null, $target_id = null,
    $uid = null) {

So you'd need to call it like so

$facebook->api_client->stream_publish( $message, null, null, $target_id ); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜