简体   繁体   English

无法发布“开放图操作”,并且收到奇怪的答复

[英]Unable to publish a Open Graph Action and I receive a weird response

My code used to work, but now I am not able to publish any actions. 我的代码曾经可以工作,但是现在我无法发布任何操作。 Everything seems to be in order but the response I get from Facebook is a JSON list of the last 25 actions I took. 一切似乎都井然有序,但是我从Facebook收到的响应是我执行的最近25个操作的JSON列表。 I know my action isn't published because I'm watching it live in a browser. 我知道我的动作未发布,因为我正在浏览器中观看该动作。 I'm also trying to post these actions with a browser. 我还尝试通过浏览器发布这些操作。

Here is my code: 这是我的代码:

https://graph.facebook.com/me/NAMESPACE:ACTION?OBJECT=http://www.example.com/pumpkinpie.html&access_token=TOKEN

The response is 25 of these: 响应是其中的25个:

{
"data": [
  {
     "id": ""****"",
     "from": {
        "id": ""****"",
        "name": "****"
     },
     "start_time": "2012-05-05T04:56:38+0000",
     "end_time": "2012-05-05T04:56:38+0000",
     "publish_time": "2012-05-05T04:56:38+0000",
     "application": {
        "id": ""****"",
        "name": ""****"
     },
     "data": {
        "website": {
           "id": ""****"",
           "url": "****",
           "type": "website",
           "title": "****"
        }
     },
     "likes": {
        "count": 0
     },
     "comments": {
        "count": 0
     }
  },

of course the * * are actual values... 当然* *是实际值...

You cannot do HTTP POST for actions in a browser, only HTTP GET, which is why you receive the list of previous actions. 您不能对浏览器中的操作执行HTTP POST,只能对HTTP GET进行,因此您会收到以前的操作列表。

Please use cURL or the Graph API Explorer to accomplish creating an action. 请使用cURL或Graph API Explorer完成创建动作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM