dongpengyu1363 2013-02-15 09:12
浏览 62
已采纳

当跳过Facebook身份验证时,我不应该找回适当的值来表明用户的决定吗?

In my app, I have the following code:

$loginUrl = $facebook->getLoginUrl( array( 'scope' => 'publish_stream' ) );
header("Location: ".$loginUrl);

which takes the user to facebook and asks them:

'[oshirowanens app] would also like permission to:
Post on your behalf
This app may post on your behalf, including status updates, photos and more.
Allow - Skip

If I click Skip, I am redirected back to my app, where I would expect to see the following url parameteres error, error_reason, and error_description similar to what happens when I user fails to login into their facebook account?

(optional) The URL to redirect the user to once the login/authorization process is complete. The user will be redirected to the URL on both login success and failure, so you must check the error parameters in the URL as described in the authentication documentation. If this property is not specified, the user will be redirected to the current URL (i.e. the URL of the page where this method was called, typically the current URL in the user's browser).

Source: https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/

Does something like that exist for skipping a permissions authentication request like the publish_stream?

  • 写回答

3条回答 默认 最新

  • douhua1760 2013-02-20 10:51
    关注

    Actually if you see the login process from FB it will be two step process.

    First you will be asked to login with your FB account, on the same page you can see the list of 'Basic permissions' the app is seeking from the user.

    After this step, you will see another dialog with set of permissions which are called as Extended permissions with 'Accept' & 'Skip'. The extended permissions are the permissions which user can decide upon skipping and even after skipping the user will be able to access the application.

    So when a user skips an extended permission, FB doesn't treat this as an error and thus doesn't return anything back to the application.

    Still if you feel that the permission you are asking is important to your application, you can ask them when you are about to do an operation related to that permission. In your case, when you are about to post on user's wall , you can ask that permission and then perform the action.

    See here on how you can handle the missing permission .

    Also you can visit the FB guidelines on best practices when it comes to asking permissions.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度