Facebook登录权限 [英] Facebook Login Permissions

查看:309
本文介绍了Facebook登录权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循基本的php facebook登录示例.当我点击登录到Facebook" URL时,它将提示用户"MYAPP希望访问您的公开个人资料和朋友列表,以及用户喜欢."

I am following the basic php facebook login example. When I tap the Login to Facebook url, it will prompt the user "MYAPP would like to access your public profile and friend list, and user likes."

我不需要访问用户的朋友列表或公开个人资料,我担心这会吓跑用户.我只希望用户能够按一下喜欢"按钮然后登录,并进行回调以确认是否按下了喜欢"按钮.

I don't need to access the user's friends list or public profile and i'm worried this will scare away the user. I just want the user to be able hit a like button and then get logged in, and have a callback verifying that the like button was pressed.

sdk说: https://developers.facebook.com/docs/facebook-login/permissions/#overview : 在基本登录流程中,您的应用可以访问某人的公开个人资料和朋友列表"

The sdk says: https://developers.facebook.com/docs/facebook-login/permissions/#overview: "During the basic login flow, your app receives access to a person's public profile and friend list"

有没有征得许可的方式吗?

Any way to do this without asking permission?

这是我的代码:

$params = array(
  "scope" => "user_likes",
  "redirect_uri" => "https://www.myapp.com/post_login_page"
);

$loginUrl = $facebook->getLoginUrl($params);

我想我也很困惑...我真的需要注册为Facebook应用程序来检测用户何时喜欢我的同人书页面吗?似乎有点重量级...

I guess I'm also confused... Do I really need to register as a facebook app to detect when users like my fanbook page? That seems kind of heavyweight...

我在这里的目标:

  1. 打开一个浏览器,向用户显示一个带有文本的大赞"按钮
  2. 当他们单击赞"按钮时,要求他们登录等
  3. 一旦成功,就像我的粉丝页面一样,将他们重定向到一个秘密网址,该网址会在我的数据库中添加一条他们喜欢该页面的记录

这不一定是超级安全的……如果有人知道如何欺骗",那就不是世界末日了.

This doesn't have to be super secure or anything... If someone figures out how to "cheat" it is not the end of the world.

推荐答案

1没有为范围"设置任何内容,在这种情况下,您不需要知道用户的数据.
2我想您确实需要拥有自己的Facebook应用.
3您可以收听类似event的用户,然后将其重定向到所需的任何位置.

1 set nothing to "scope", you don't need to know your user's like data in this scenario.
2 I guess you do need to have you own facebook app.
3 You can listen to user like event , and then redirect them wherever you want.

这篇关于Facebook登录权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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