Hi there!
I was able to share a facebook update with this function, but I don’t know how to use facebook graph to share a status update with an image.
I’m using https://atmospherejs.com/stevezhu/fbgraph but in the docs I haven’t found a way to upload media. Have anyone figured out how to do that from Meteor’s backend?
var facebookPostText = function (shareable, onAfterFacebook) {
console.log('------> facebookPostText');
FBGraph.setAccessToken(Meteor.user().services.facebook.accessToken);
var facebookUserId = Meteor.user().services.facebook.id;
var method = facebookUserId+'/feed';
console.log('------> about to facebook api '+ method);
console.log(Meteor.user().services.facebook.accessToken);
FBGraph.post(method, { message: shareable.share.text }, function (error, answer) {
console.log('------> facebook response', answer);
if (error) {
console.log('Could not post on facebook', error);
} else {
shareable.facebookAnswer = answer;
onAfterFacebook.apply(null, [apito]);
}
});
};`