Facebook 图 API Post 有一个地方
Facebook Graph API Post with a place
您好,我想弄清楚 javascript 应用程序对 post 用户提要(包括地点)的要求是什么。
到目前为止,我能够 post 一个普通的提要项目(名称、link 等),但是当我尝试包含一个地方时,我得到了这个错误:
{message: "An unknown error has occurred.", type: "OAuthException", code: 1}
这是我正在尝试的 json post:
var opts = {
message : $scope.message,
name : $scope.name,
link : $scope.link,
description : $scope.description,
application:$scope.appID,
place:{
latitude:$scope.location.latitude,
longitude:$scope.location.longitude,
altitude:0,
city:$scope.location.place
}
};
纬度为 39
经度为-9.12
城市是 'Caldas da Rainha'
是否需要特定权限才能post引用一个地方(只需要publish_actions和user_tagged_places似乎是为了阅读)?还是我做错了什么?
看看
关于 place
字段,文档指出
Page ID of a location associated with this post.
因此,无法定义自定义对象并将其添加到 JSON,您必须在 page_id
中搜索要使用的位置=38=]第一。
您可以使用地名搜索(如果您知道自己所在的位置)
/search?q=Caldas+da+Rainha&type=place
或如果您有坐标则进行邻近搜索
/search?q=&type=place¢er=39,-9.12&distance=5000
见
您好,我想弄清楚 javascript 应用程序对 post 用户提要(包括地点)的要求是什么。 到目前为止,我能够 post 一个普通的提要项目(名称、link 等),但是当我尝试包含一个地方时,我得到了这个错误:
{message: "An unknown error has occurred.", type: "OAuthException", code: 1}
这是我正在尝试的 json post:
var opts = {
message : $scope.message,
name : $scope.name,
link : $scope.link,
description : $scope.description,
application:$scope.appID,
place:{
latitude:$scope.location.latitude,
longitude:$scope.location.longitude,
altitude:0,
city:$scope.location.place
}
};
纬度为 39
经度为-9.12
城市是 'Caldas da Rainha'
是否需要特定权限才能post引用一个地方(只需要publish_actions和user_tagged_places似乎是为了阅读)?还是我做错了什么?
看看
关于 place
字段,文档指出
Page ID of a location associated with this post.
因此,无法定义自定义对象并将其添加到 JSON,您必须在 page_id
中搜索要使用的位置=38=]第一。
您可以使用地名搜索(如果您知道自己所在的位置)
/search?q=Caldas+da+Rainha&type=place
或如果您有坐标则进行邻近搜索
/search?q=&type=place¢er=39,-9.12&distance=5000
见