简体   繁体   English

询问Facebook应用的权限

[英]Ask permissions for facebook app

I've developed a facebook app that requires the publish_stream permission to post a dynamically generated image to user's wall. 我开发了一个Facebook应用程序,该应用程序需要publish_stream权限才能将动态生成的图像发布到用户的墙上。

It functions good, but when a new user wants to use the app, it asks for login and THEN it asks for publish stream permission, and gives them the option to deny that permission and still continue with app. 它的功能很好,但是当新用户要使用该应用程序时,它要求登录,然后再请求发布流许可,并为他们提供拒绝该许可权的选项,并继续使用该应用程序。

I'd like to have ONE dialog panel asking for login AND permission at the same time, so if user does not authorize the app to upload photos, then it wont work. 我想要一个对话框同时要求登录和许可,所以如果用户未授权该应用上传照片,那么它将无法正常工作。 I've seen this with other similar apps. 我在其他类似的应用程序中看到了这一点。

I'm using the following PHP code for this: 我为此使用以下PHP代码:

$login_url = $facebook->getLoginUrl(
    array(
    'scope'             => 'publish_stream'
    )
);

if (! $facebook->getUser()) {
    echo <<< EOT
<script type="text/javascript">
top.location.href = "$login_url";
</script>;
EOT;

exit;
}

Any help is appreciated. 任何帮助表示赞赏。

Thank you! 谢谢!

EDIT: 编辑:

I'm not talking about users logging in to facebook, but users logging in to use App. 我并不是说用户登录到Facebook,而是用户登录以使用App。

here are some screenshots of the dialogues: 这是对话的一些屏幕截图:

http://imgur.com/a/IxFfV http://imgur.com/a/IxFfV

Thank you again 再次感谢你

Disable the 'Enhanced Auth Dialog' in your app's advanced settings. 在应用程序的高级设置中禁用“增强的身份验证对话框”。 The new auth dialog uses two screens, this is what everyone will be eventually migrated to. 新的身份验证对话框使用两个屏幕,这是每个人最终都将迁移到的屏幕。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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