0

So, I've created a wedding event on my FB account. Now on my website (static) I would like to have a form (maybe embedded or something from FB) that a visitor could leave a message on it for greetings. That message would instantly post on the event I have created.

I hope you understand what I would like to achieve. Is it now possible to do that? Or Is there an API for this? comment mirroring seems not applicable for events.

If it's not possible to achieve, is there an alternative that is easy to integrate on my site and of course the message will post on FB.

c.k
  • 1,075
  • 1
  • 18
  • 35

1 Answers1

0

There are tons of APIs for Facebook, all listed on the Facebook developers documentation page: https://developers.facebook.com/docs/

But I think what you're looking for is something like this: https://developers.facebook.com/docs/javascript/examples

Trigger a Share dialog

The Share Dialog allows someone using a page to post a link to their timeline, or create an Open Graph story. Dialogs displayed using the JavaScript SDK are automatically formatted for the context in which they are loaded - mobile web, or desktop web.

Let's make an API call to publish a message. Add the code into the response function of the FB.login call you added above:

FB.login(function(){
    // Note: The call will only work if you accept the permission request
    FB.api('/me/feed', 'post', {message: 'Hello, world!'});
}, {scope: 'publish_actions'});

Try the script. A status message will be posted to your timeline: Hello, world!

Davatar
  • 160
  • 1
  • 14
  • Thank you for this, what I wanted is like a comment mirroring. Where in the comments will posted in my main post. But comment mirroring only works on FB pages not on FB personal account. – c.k Nov 22 '16 at 04:09