在Facebook上私人使用图形API传送给朋友的墙壁 [英] Posting to a friends wall on facebook privately using graph api

查看:122
本文介绍了在Facebook上私人使用图形API传送给朋友的墙壁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的应用程序发送一个信息到朋友墙上,并将其设置为私有的,这对登录的用户和朋友是可见的。
我想使用新的图表api来做到这一点,我看到如果我在feed文章中设置了to参数,它将被发布到用户的朋友墙。

I wanted to post a feed to a friends wall from my app and set it as private, which is viewable to the logged in user and the friend. I want to do this using the new Graph api, I saw that if I set the "to" parameter in the feed post, it will be posted to the users friend wall.

我在这里找到一个代码:
http://forum.developers.facebook.net/viewtopic.php?id=56458
(由VovaOnline发表)

(链接已经死了,因为Facebook已经掉下来论坛)

I found a code here: http://forum.developers.facebook.net/viewtopic.php?id=56458 (Posted by VovaOnline) (link is dead, as facebook has taken down the forum)

$result = $facebook->api('/me/feed', 'POST', array(
            'from' => array(
                'name' => 'Vladimir Ageenko',
                'id'   => '100001308281502'
            ),
            'name'    => 'TEST NAME',
            'caption' => 'Test Caption',
            'description' => 'Test Description',
            'message' => 'This is test.',
            'privacy' => array(
                'description' => 'Vladimir Sergeevich',
                'value'   => 'CUSTOM',
                'friends' => 'SOME_FRIENDS',
                'allow'   => '100001338940933'
            )
         ));

我将帖子类型设置为链接。
任何人都可以告诉我这个代码有什么问题。有一件事,我知道从字段必须是到,它必须在数据变量中传递。我不知道该怎么做
可以帮助我吗?

I am setting the post type as "link". Can anyone tell me what is wrong in this code. One thing I know that "from" field has to be "to" and it has to be passed in a "data" variable. I am not sure how to do it. Can any one help me?

推荐答案

我不认为Facebook可以让你目前这样做。查看图表API文档发布:

I don't think Facebook allows you to do this currently. Look at the graph API docs on Posting:

http://developers.facebook.com/docs/reference/api/post/

它说隐私:


注意:此隐私设置仅适用于当前或指定用户自己的墙的帖子。Facebook忽略此设置用于定向的墙上帖子(当用户为写在墙上的朋友,页面,事件,组与用户相关联)。与Facebook上的行为一致,任何可以看到目标墙的人都可以查看所有有针对性的帖子。

"Note: This privacy setting only applies to posts to the current or specified user's own Wall. Facebook ignores this setting for targeted Wall posts (when the user is writing on the Wall of a friend, Page, event, group connected to the user). Consistent with behavior on Facebook, all targeted posts are viewable by anyone who can see the target's Wall. "

我解释这个意思是说,如果你发贴在别人的墙上(饲料),隐私是你的控制。

I interpret this to mean that if you post on someone else's wall (feed), privacy is out of your control.

这篇关于在Facebook上私人使用图形API传送给朋友的墙壁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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