申请权限 [英] Permissions for application
问题描述
我设置 User&朋友权限
在我的应用程序,以获取用户的电子邮件在网站上。当我点击预览登录对话框
时,我得到这个信息:
I set User & Friend Permissions
on my application, to get user email on website. I get this info when I click Preview Login Dialog
:
这个应用程序将被接收您的基本信息
您的电子邮件地址(xyz@xyz.com)
您的生日
$ b
THIS APP WILL RECEIVE:
Your basic info
Your email address (xyz@xyz.com)
Your birthday
Your relationship details
Your photos
当我尝试登录我的网站,应用程序只需要这些信息:
when I tried to log in on my website, application needs only this information:
此应用程序将会收到:
THIS APP WILL RECEIVE:
Your basic info
为什么?为什么主应用程序不具有与预览相同的权限?
Why? Why doesn't the main application have the same permissions as the preview?
注意
编辑:
m使用本教程中的Auth: http:// www.asp.net/mvc/tutorials/mvc-4/using-oauth-providers-with-mvc - 代码在我的项目中没有变化。
老实说,我不想改变授权方式,因为我也想提供Twitter登录,这个机制对我来说是完美的。
我只想添加为Facebookscope = email,publish_stream。
I'm using Auth from this tutorial: http://www.asp.net/mvc/tutorials/mvc-4/using-oauth-providers-with-mvc - and code has not changed in my project.
Honestly, I don't want to change authorization methods, because I also want to provide Twitter login, and this mechanism is perfect for me.
I just want to add for Facebook "scope=email,publish_stream".
我发现,当我把这个查询手动当我的网站重定向到Facebook应用程序(& scope = email,publish_stream
),一切都很完美。有没有办法解决这个问题的代码?
I discovered, that when I put this query manually when my website redirect me to facebook application (&scope=email,publish_stream
), everything works perfect. Is there any solution to do this on back-code?
推荐答案
解决问题
如果您正在使用本教程: http://www.asp.net/mvc / tutorials / mvc-4 / using-oauth-providers-with-mvc
插入
包管理器控制台
此命令 update-package DotNetOpenAuth.Core
现在您的应用程序将自动请求用户电子邮件 - 您不必更改任何内容。
在此您将找到结果 - result.UserName
If you are using this tutorial : http://www.asp.net/mvc/tutorials/mvc-4/using-oauth-providers-with-mvc
Insert in your
Package manager console
this command update-package DotNetOpenAuth.Core
Now your application will automatically ask for user e-mail - you don't have to change anything.
Here you will find result - result.UserName
这篇关于申请权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!