Moti Monsonego
Moti Monsonego

Reputation: 1

Add new object with facebook developer api v2.8

Im trying to add new object through Object Browser.

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.

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

First App: have the "New Object" button

The App with the option to add objects

Second App: doesnt have the "New Object" button

The App that has no "add" button

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

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.

Thanks in advance

Moti Monsonego

Upvotes: 0

Views: 673

Answers (1)

Faisal Imran
Faisal Imran

Reputation: 289

As Facebook announced

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:

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

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. 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.

Graph API Explorer Screenshot for help

  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

Upvotes: 1

Related Questions