开发者

Facebook: Post to friend's wall but NOT to their feed (Graph API)

开发者 https://www.devze.com 2023-02-10 00:34 出处:网络
Hi I am using the graph API to post to the the wall of a friend. However I do not want the post to be visible on any News Feeds

Hi I am using the graph API to post to the the wall of a friend. However I do not want the post to be visible on any News Feeds (the posting user, the friend being posted to, or anyone else).

How can I achieve this. Here is my wall post code:

function fb_post($to_uid,$acToken) {
    $result = false;
    global $fb;
    $feed_dir = '/'.$to_uid.'/feed/'; 
    $message_str =  'This is a message';
    $msg_body = array('开发者_StackOverflow中文版access_token' => $acToken, 
                      'message' => $message_str, 
                      'name' => 'Wall Post',
                      'caption' => "I posted to your wall",
                      'link' => 'http://www.wallpost.com',
                      'description' => 'Learn how to post to peoples walls', 
                      'picture' => 'http://image.com/myimage.jpg',
                      'actions' => array(array('name' => 'Wall Post',
                                  'link' => 'http://www.wallpost.com'))
                      );

    try {
        $result = $fb->api($feed_dir, 'post', $msg_body);
    } 
    catch (Exception $e) {       
              echo "Not sent";
       }
}

Thanks.


Short answer is no.

Facebook's recent lists and so on are a dynamic amalgamation of posts - a post can't be marked to opt-out of this, Facebook decides its relevancy and coverage.

A user may have their profile configured to so that postings of certain types/from certain applications are handled in a specific way, but there's nothing you can personally do about that - and I still don't think it encompasses options to hide posts from feeds, mainly just disallow them from their wall in the first place.


You can add 'privacy' => '{value: SELF}'. However, it work for users who are already in application. So friend of user who posting something to his friend's wall should be authorized in our application as well

0

精彩评论

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