Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Facebook Share button event for FB.Event.subscribe?

I'm looking to split test clicks between the Facebook Like button and Facebook Share button. I know I can attach an event handler of FB.Event.subscribe('edge.create',...) to track clicks on the Facebook like button, but is there a corresponding event for the Facebook share button? There doesn't appear to be on in the FB.Event.subscribe documentation.

like image 738
Ricky Zein Avatar asked Nov 22 '13 19:11

Ricky Zein


People also ask

What is a Facebook event link?

You set up Facebook events to organize a gathering or conference for your Facebook followers. You can also link Facebook events on your website, which sets up an external link so other users can also see the event plans and dates.

How do Facebook events work?

Facebook events allow users to invite a select group of people or their entire list of friends. These invitations can reach thousands of people in minutes. They also include an RSVP feature, allowing invitees to accept or decline the invitation. This information is sent back to the user who is hosting the event.


1 Answers

There is no event for this - if you need to be notified when a user clicks shares from within your app, you should create your own share button and display the Feed/Share dialog when clicked:

$('#shareButton').click(function() {
    FB.ui({
        method: 'feed',
        link: 'https://developers.facebook.com/docs/dialogs/',
        caption: 'An example caption',
    }, function(response){
        if (response === null) {
            console.log('was not shared');
        } else {
            console.log('shared - post id is ' + response.post_id);
        }
    });
});
like image 119
madebydavid Avatar answered Oct 03 '22 05:10

madebydavid