dtq81142 2014-05-02 11:49
浏览 49
已采纳

在Facebook中重定向URI的目的

enter image description here

I noticed that we supply a URL while creating our app in facebook, so suppose this is URL 1 . Then within our code we supply another redirect_uri,

 $params = array(
    'scope' => $config['facebook_scope']
    'redirect_uri' => $config['root'].'php/class/fbLogin.php'
);

$link = $facebook->getLoginUrl($params);
echo $link;
    header('location: '.$link);

whats the purpose of site URL if we already provide a redirect Uri in our app

2- There is also something called callback URL in the creation of app.

I was just curious to know how thee 3 URls are different from each other

I read about redirect_uri from here

  • 写回答

1条回答 默认 最新

  • drwu24647 2014-05-02 12:00
    关注

    In the oAuth process the redirect uri is where your user will be sent back to once they have authorised (or not) your application. The redirect page will often receive some extra information about authorisation, an auth code, token etc.

    The redirect uri has to match the one provided when registering the application for security reasons. This way, even if the applications secret was compromised, an attacked would still have to also take over the redirect page in order to attack user accounts. Attempts to authenticate users with a non-matching redirect uri will result in an error.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示