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条)

报告相同问题?

悬赏问题

  • ¥15 ADS生成的微带线为什么是蓝色空心的
  • ¥15 求一下解题思路,完全不懂
  • ¥15 tensorflow
  • ¥15 densenet网络结构中,特征以cat方式复用后是怎么进行误差回传的
  • ¥15 STM32G471芯片spi设置了8位,总是发送16位
  • ¥15 R语言并行计算beta-NTI中tree文件的类型
  • ¥15 如何解读marsbar导出的ROI数据?
  • ¥20 求友友协助弄一下基于STC89C52单片机的声光控制灯原理图
  • ¥15 arduino双向交通灯设计
  • ¥15 有没有会粒子群算法的大能(○゜ε^○)求带不会出收敛图😭