Skip to content

Instantly share code, notes, and snippets.

@rbinksy
Last active May 27, 2016 20:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rbinksy/8c00d8470ff001e7179e to your computer and use it in GitHub Desktop.
Save rbinksy/8c00d8470ff001e7179e to your computer and use it in GitHub Desktop.
//Create a new Graph Object
FB.api(
'me/objects/video.movie',
'post', {
'object': {
'title': 'Sample Movie',
'type': 'video.movie',
'image': 'http://stuffpoint.com/cats/image/41633-cats-cute-cat.jpg',
'url': 'http://localhost:9000',
'description': 'Example Description Here',
'app_id': '665449656906267',
'access_token': 'CAAJdORJqchsBAAZBxrzwMn7vHSJYEZBOD1ZBM9qectBro9Wu9UhyDHHIcDjAIVajNmxsbPeVLqyS2eOqt0TIGftQlQS8vjPwFY1htqxqJMDTBwtje3ioepOPAGGsHKanZA5N3An2ZB3dE4jXR4ytmT1UBubhPq1gZCP5PoSBqjr2ac5MJZAJlWz1FrPZCSmF7mtcHa1QciZCyKLzlafgDNbEbWsLQlmvwSpEZD'
}
},
//Call the FB Share dialog - referencing newly created object.
function(response) {
FB.ui({
method: 'share_open_graph',
action_type: 'video.watches',
action_properties: JSON.stringify({
video: response.ID
})
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment