使用Facebook API的地理位置页面帖子 [英] Geotargeting Page Posts with the Facebook API

查看:152
本文介绍了使用Facebook API的地理位置页面帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Facebook PHP SDK将墙壁地图定位到我的粉丝页面。

I'm trying to geotarget wall posts to my fan page using the Facebook PHP SDK.

以下代码片段成功地将消息发布到我的墙壁,但是地理位置定位不服用

The following snippet successfully posts a message to my wall, but the geotargeting isn't taking.

我是新手编程,我已尽力遵循文档这里,但它相当稀疏 - 我不确定我的语法是正确的。

I'm new to programming and I've done my best to follow the documentation here but it's pretty sparse -- I'm not confident that my syntax is correct.

任何帮助将非常感激。

//compiling the geotargeting parameters
$geoTarget = "{'cities':'Richmond,VA','regions':'Virginia','countries':'US'}";

//my arguments
$args = array(
'access_token'  => $page_access_token,
'message'       => "this is my message",
'targeting' => $geoTarget
);

//posts the message
$facebook->api("/$page_id/feed","post",$args);


推荐答案

该字段是Post表中的隐私

The field is privacy in the Post table

如果指定了按地点/语言定位的专页,则说明字段可能包含有效的国家/地区,城市和语言的逗号分隔列表。

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.

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

这篇关于使用Facebook API的地理位置页面帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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