使用Facebook Developer API V2.8添加新对象 [英] Add new object with facebook developer api v2.8

查看:97
本文介绍了使用Facebook Developer API V2.8添加新对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过对象浏览器添加新对象.

Im trying to add new object through Object Browser.

我有2个具有Facebook集成功能的应用程序,它们的api版本均为2.8, 其中之一一切正常,而第二个中我无法添加新对象.

I have 2 apps with facebook integration, they both api versions are 2.8, in one of them everything works perfect, In the second one I cant add new objects.

在facebook禁用自定义打开图并将api更新到2.8之前,我没有问题....

Before facebook disabled Custom Open Graph and updated the api to 2.8 I had no problems....

第一个应用:具有新建对象"按钮

First App: have the "New Object" button

具有添加对象选项的应用程序

第二个应用:没有新建对象"按钮

Second App: doesnt have the "New Object" button

没有添加"按钮的应用

我已经仔细检查了两个应用程序中的所有设置,发现我没有忘记什么,一切似乎都很好.

I've double checked all setting in both apps to see that I didn't forgot something and its all seems OK.

如果有任何其他选项可添加新对象(而不是通过对象浏览器),将非常适合.我试图通过Graph API资源管理器添加,但没有成功.

If there is any other option to add new object (not throuth the Object Browser) it will be great to. I've tried to add through Graph API Explorer with no success.

预先感谢

Moti Monsonego

Moti Monsonego

推荐答案

Facebook宣布

As Facebook announced

自定义Open Graph故事在Graph API 2.8中已弃用. Graph API 2.7及更低版本将根据以下时间表支持自定义Open Graph故事:

Custom Open Graph stories are deprecated in Graph API 2.8. Graph API 2.7 and lower will support custom Open Graph stories according to the following schedule:

对创建新对象的支持将于2017年1月结束. 发布现有对象将在2017年10月结束.

Support for creating new objects will end in January 2017. Support for publishing existing objects will end October 2017.

现在,我们只能使用预定义的对象类型操作类型

Now we can only use predefined Object Types and Action Types

对象实例是通过网页上的 Open Graph HTML 标记定义的.如果您没有网络服务器来托管内容,则可以使用对象API 即可上传和发布对象.

Objects instance are defined by Open Graph HTML markup on web pages. If you don't have a web server to host your content, you can use the Object API to upload and publish objects.

要在对象浏览器中获取新对象按钮 您必须先注册对象类型

To get New Object Button in Object Browser You have to first register object type

  1. 转到图形API资源管理器
  2. 获取应用访问令牌
  3. 将方法从下拉菜单更改为 POST
  4. 添加字段
  5. 在名称字段 object
  6. 中写入
  7. 在值"字段中添加对象的JSON,例如
  1. Go to Graph API Explorer
  2. Get App Access Token
  3. Change method To POST from drop down
  4. Press Add a Field
  5. write in Name Field object
  6. In Value Field Add your object's JSON e.g



    {
      "app_id":APP_ID,
      "type":"product",
      "url":"http:\/\/samples.ogp.me\/306382486524859",
      "title":"SAMPLE TITLE",
      "image":"URL OF YOU IMAGE",
      "description":"SAMPLE DESCRIPTION"
    }


 - app_id – This is the ID of your game.
 - type – type of Object you arecreating. 
 - url – This should be the url of your game. 
 - title – The title to display. 
 - image – The url to the image that you want to display. 
 - description – A short description of the object.

图形API资源管理器屏幕截图以获取帮助

  1. 按提交
  2. 如果一切正确,您应该会看到一个ID作为响应返回.
  3. 现在转到对象浏览器
  4. 会有一个新对象按钮
  1. Press Submit
  2. If everything is correct, you should see an ID returned as a response.
  3. Now Go To Object Browser
  4. There will be a New Object Button

这篇关于使用Facebook Developer API V2.8添加新对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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