Facebook Graph Api发布以供稿返回:“(#100)参数位置必须是有效的位置标签ID". [英] Facebook Graph Api publishing to feed returns: "(#100) Param place must be a valid place tag ID"
问题描述
我正在使用图谱API资源管理器在Facebook Graph Api上搜索使用以下端点的某个地方:
I am searching at Facebook Graph Api, using graph api explorer, for some place using the following endpoint:
/search?type = place& q = centauro& fields = id,名称,链接
/search?type=place&q=centauro&fields=id,name,link
我得到这个答复:
"data": [
{
"id": "492103517849553",
"name": "Centauro",
"link": "https://www.facebook.com/Centauro-492103484516223/"
},
{
"id": "313439499156253",
"name": "Centauro",
"link": "https://www.facebook.com/Centauro-313439462489590/"
},
{
"id": "175812113006221",
"name": "Centauro",
"link": "https://www.facebook.com/Centauro-175812079672891/"
},
{
"id": "1423220914594882",
"name": "Centauro",
"link": "https://www.facebook.com/pages/Centauro/1423220891261551"
},...
当我尝试使用"id"字段发布时,返回:
When I try to publish using the field "id" returned:
/me/feed
/me/feed
带有字段:
消息:测试
位置:492103517849553
place: 492103517849553
我收到以下答复:
{
"error": {
"message": "(#100) Param place must be a valid place tag ID",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "DfEKOjZX8g+"
}
}
但是,如果我使用链接的最终编号:
But if I use de final number of the link:
492103484516223
492103484516223
然后重试:
/me/feed
/me/feed
带有字段:
消息:测试
位置:492103484516223
place: 492103484516223
它完美地工作.
那么,有没有一种方法可以获取正确的发布地点ID?还是一个错误?
So, is there a way to get te correct place id for publishing? Or is it a bug?
推荐答案
我也收到(#100)参数位置必须是有效的位置标签ID"错误,但是通过提供JSON字符串使它消失了在地方"元素中.
I was also getting the "(#100) Param place must be a valid place tag ID" error, but got it to go away by providing a JSON string within the 'place' element.
所以您的请求内容是这样的:
So where the content of your request was this:
位置:492103484516223
place: 492103484516223
改为格式化地点信息:
place:{"id":"492103484516223"}
place: {"id": "492103484516223"}
这篇关于Facebook Graph Api发布以供稿返回:“(#100)参数位置必须是有效的位置标签ID".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!