简体   繁体   中英

Facebook: any faster alternative to Like Button Event?

I'm looking for a faster alternative to know when someone hit the like button on my site. Currently I'm using the Event.subscribe('edge.create') to get notified, but the response is sent about 3-4 seconds after the user hit the Like button.

Does anyone has an idea for a faster (ideally instant) solution?

I noticed that the second I hit the button the Comment box is popping under the Like Button, so maybe there is a way to use it as a trigger for an event.

Obviously the fact that the button is in an iFrame is the most challenging issue here.

Obviously the fact that the button is in an iFrame is the most challenging issue here.

That's not a challenging issue – that's an issue that won't let you do anything about it.

The same origin policy prevents you from interacting with the iframe's content from your scripts. Facebook does some cross-domain communication in the background … and that's why it takes a little time before the event you registered fires.

I don't see any way of working around that, sorry.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM