到目前爲止,我一直試圖通過Graph API在頁面上發佈地理定位狀態更新。使用圖表API在Facebook中定位帖子
使用Facebook圖形API,我已成功地將地理定位到國家,但不是城市或地區。
嘗試任何這些:
>>> graph.put_object("me", "feed", message="Targeted at Boston", targeting={"countries": 'US', 'cities': 'boston, ma'})
>>> graph.put_object("me", "feed", message="Targeted at Boston", targeting={"countries": 'US', 'cities': ['us, boston, ma']})
>>> graph.put_object("me", "feed", message="Targeted at Boston", targeting=[{'country': 'us', 'city': 'boston', 'region': 'ma'}])
>>> graph.put_object("me", "feed", message="Targeted at Seattle", targeting={"countries": 'US', 'cities': [{'name': 'seattle, wa'}]})
>>> graph.put_object("me", "feed", message="Targeted at Seattle", targeting={"countries": 'US', 'cities': [{'name': 'seattle, wa'}]})
結果在任何一個公共職位,或自定義隱私後,但不針對任何特定的位置。
此:
>>> graph.put_object("me", "feed", message="Targeted at Seattle", targeting={"countries": 'US'})
工作選擇性地靶向只有美國。
我對請求使用了Facebook python-sdk。
我一直在嘗試多種方式來使定位工作,但它記錄不完整,Facebook開發人員論壇上沒有太多可用的信息。
有沒有人能夠通過json用於geotarget多個目標....像波士頓,馬薩諸塞州,巴黎,法國(在法國),然後在兩個同時?
如果您仍然遇到相關問題,請記錄錯誤:https://developers.facebook.com/bugs –