如何使用 Facebook 开放图谱协议获取对博客条目或页面点击“点赞”按钮的用户电子邮件地址?
我已经按照 http://developers.facebook.com/docs/opengraph 实现了 Facebook 开放图协议完全集成/ 和 http://www.websitedesign411 .com/blog/facebook-open-graph-protocol-full-integration-walkthrough。
如何获取对某些博客条目或页面点击“赞”按钮的用户电子邮件地址?
I have implemented Facebook Open Graph Protocol Full Integration following the http://developers.facebook.com/docs/opengraph/ and http://www.websitedesign411.com/blog/facebook-open-graph-protocol-full-integration-walkthrough.
How can I get user e-mail addressess that clicked the like button for certain blog entries or pages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你不能。访问电子邮件地址需要提示用户提供扩展权限。您无法通过简单的“点赞”操作来获取该信息。这将是垃圾邮件发送者的梦想!
http://developers.facebook.com/docs/authentication/
You can't. Access to the email address requires prompting the user for extended permissions. You can't get that information through a simple "Like" action. That would be a spammers dream!
http://developers.facebook.com/docs/authentication/
我不相信您可以仅仅因为 Facebook 用户点击了您的“赞”按钮就可以访问他们的电子邮件地址。您需要做的是让用户使用 facebook connect 对您的应用程序进行身份验证(通常通过单击蓝色的“连接”按钮),在此过程中您可以提示他们共享他们的电子邮件地址。电子邮件是一种“扩展权限”,因此您需要明确请求。
您可以使用 facebook javascript SDK 轻松实现此身份验证:
http://developers.facebook.com/docs/reference/javascript/
一旦用户已通过您的应用程序的身份验证,允许访问他们的电子邮件,您可以通过图形 api 获取他们的电子邮件地址:
http://developers.facebook.com/docs/reference/api/user/
I don't believe you can access a facebook user's email address just because they clicked on your Like button. What you will need to do is get the user to authenticate to your application using facebook connect (usually by clicking on that blue "Connect" button), and in the process you can prompt them to share their email address. Email is an 'extended permission' so you need to ask explicitly for it.
You can implement this authentication bit easily enough with the facebook javascript SDK:
http://developers.facebook.com/docs/reference/javascript/
Once the user has authenticated to your application allowed access to their email you can can fetch their email address via the graph api:
http://developers.facebook.com/docs/reference/api/user/
与喜欢您的页面的人交流的最简单方法是在您的页面墙上发布有趣的消息,引导他们访问您的 Facebook 应用程序。
然后,您可以让他们授权您的应用程序(有或没有扩展权限)。
一旦获得授权,您就可以通过多种方式进行交流,例如:
使用 livemessage
http://developers.facebook.com/docs/reference/rest/livemessage。 发送/
创建一个事件并将其用户 ID 添加到其中。
顺便说一句,获取用户 id 的方法是:
1) 使用以下方法获取页面/url 的对象 id
https://graph.facebook.com/?id={URL}
2) 通过检索用户 ID
https://graph.facebook.com/{mypageid}/likes
The easiest way to communicate with folks who like your page is to post interesting messages on your page's wall leading them to your facebook app.
You then get them to authorize your app (with or without extended permissions).
Once authorized, you are able to communicate several ways like:
using livemessage
http://developers.facebook.com/docs/reference/rest/livemessage.send/
create an event and add their user id to it.
BTW, the way to get their user ids is:
1) getting the object id of your page/url using
https ://graph.facebook.com/?id={URL}
2) retrieving the user ids via
https: //graph.facebook.com/{mypageid}/likes