如何通过Graph API指定FB帖子的位置定位 [英] How to specify location targeting of FB post via Graph API

查看:135
本文介绍了如何通过Graph API指定FB帖子的位置定位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不久前, 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?

推荐答案

进行定位,请参见发布对象的privacy属性:

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屋!

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