如何通过Graph API指定FB帖子的位置定位 [英] How to specify location targeting of FB post via Graph API
问题描述
不久前, Post API参考,但现在不见了,我不知道如何通过API向帖子添加特定的位置和语言定位.我进行了很多搜索:一些结果引用了targeting
参数.我已经尝试过了,但是似乎不起作用.
Some time ago there was a field called targeting
in the Post API Reference but now it's gone and I don't know how to add a specific location and language targeting to the post via API. I've search a lot: some results refer to the targeting
parameter. I've tried it, but it seems don't working.
我尝试了两种方法来实现这一目标,但没有成功:
I've tried 2 ways to achieve this, but without any success:
$post_details = array('message' => $msg, 'privary' => array('value' => 'CUSTOM', 'description' => array('country' => 'Germany')));
$fb->api('/PAGE_ID/feed', 'POST', $post_details);
和
$post_details = array('message' => $msg, 'targeting' => array('country' => 'Germany'));
$fb->api('/PAGE_ID/feed', 'POST', $post_details);
请帮助我了解如何实现此目标?
Please help me understand how can I achieve this?
推荐答案
for targeting, see the privacy
property of the post object: https://developers.facebook.com/docs/reference/api/post/
说明字段可能包含逗号分隔的有效列表 国家/地区,城市和语言(如果专页信息的发布目标是 指定位置/语言.
The description field may contain a comma-separated lists of valid country, city and language if a Page's post targeting by location/language is specified.
注意:此隐私设置仅适用于当前或 指定用户自己的墙. Facebook忽略此设置以定位 墙贴(当用户在朋友的墙上写Page时, 事件,组已连接到用户).与行为一致 在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.
这篇关于如何通过Graph API指定FB帖子的位置定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!