当点击FB按钮时,如何发送一个Facebook用户的电子邮件? [英] How can I send a facebook user an email when they click on the FB like button?

查看:517
本文介绍了当点击FB按钮时,如何发送一个Facebook用户的电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户点击页面上的Facebook按钮后,我想自动发送一封电子邮件给他们。这是可能的吗?

After a user clicks the Facebook like button on my page, I want to automatically send an email to them. Is this possible?

推荐答案

您不能强制用户连接您的应用程序,并授予电子邮件许可通过点击喜欢按钮。

You cannot enforce user to connect with your application and grant email permission by clicking Like Button.

然而,您可以订阅 edge.create 事件(使用 JS-SDK ),并调用 FB.login 为您的用户提供与您的应用程序连接的能力(请求电子邮件权限),因此您可以发送电子邮件给他。这是一个可选的,我说的不能执行。只要用户能够看到Like按钮没有什么可以阻止他点击它。

You can however subscribe to edge.create event (using JS-SDK) and call FB.login to provide your user with ability to connect with your app (requesting email permission) so you'll be able to send an email to him. This is an optional and as I said can't be enforcement. As long as user able to see Like Button nothing can prevent him to click it.

其他选项仅向已经授权您的应用程序的用户显示Like Button,因此您可以在他甚至能够喜欢之前抓住所有必需的信息,稍后显示Like Button,听事件并发送电子邮件。

Other option is displaying Like Button only to users who already authorized your application, so you can grab all the required info before he even able to like, later display Like Button, listen to event and send an email.

更新: br>
您可能想要阅读有关 JS-SDK 的文档,特别是在 FB.Event.subscribe FB。登录

Update:
You'll probably want to read documentation on JS-SDK, especially on FB.Event.subscribe and FB.login.

Update2:

看来(根据您创建的其他问题)您正在Facebook页面选项卡中实现此目的。这使得任务不可解决,因为用户将永远看到并能够喜欢页面,然后才能做某事。您只能从页面标签应用程序中的用户请求所需的信息,完全由用户接受...

Update2:
As it seems (according to other question you created) that you're trying to achieve this in Facebook Page tab. This making the task unsolvable since user will always see and be able to like page before you can do something. You can only request desired info from user in Page tab application and it's totally up to user to accept it or not...

这篇关于当点击FB按钮时,如何发送一个Facebook用户的电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆