criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 176 forks source link

Posting Custom Open Graph Object #29

Closed emschwartz closed 11 years ago

emschwartz commented 11 years ago

I am having trouble figuring out how to use fbgraph to post a custom Open Graph object, or figuring out if it is actually possible using fbgraph.

The example code that FB gives me for creating an object is:

FB.api(
  'me/objects/[app]:[obj_type]',
  'post',
  {
    app_id: [app_id],
    type: "[app]:[obj_type]",
    url: "[sample_url]",
    title: "[sample_title]",
    image: "[link_to_img]",
    description: ""
  },
  function(response) {
    // handle the response
  }
);

and to post the action it gives me:

FB.api(
  'me/app:create',
  'post',
  {
    [obj_type]: "[sample_url]"
  },
  function(response) {
    // handle the response
  }
);

Is this possible to recreate with fbgraph? If so, would it be possible to include instructions and examples for how to do this in the Readme?

Thank you very much!

criso commented 11 years ago

Posts are passed directly to facebook. No reason why it shouldn't be possible.