zoukankan      html  css  js  c++  java
  • 访问控制服务(ACS)Facebook Angkor:

    string callbackURL = "https://demo.accesscontrol.windows.net";// 需要你注册你的移动应用访问服务wndows azure ACS

    String FacebookURL = "https://www.facebook.com/dialog/oauth?client_id=" + Uri.EscapeDataString("402........") + "&redirect_uri=" + Uri.EscapeDataString(callbackURL) + "&scope=read_stream&display=popup&response_type=token";

    System.Uri StartUri = new Uri(FacebookURL);
    System.Uri EndUri = new Uri(callbackURL);

    WebAuthenticationResult WebAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(
    WebAuthenticationOptions.None,
    StartUri,
    EndUri);
    if (WebAuthenticationResult.ResponseStatus == WebAuthenticationStatus.Success)
    {
    this.tbToken.Text = WebAuthenticationResult.ResponseData.ToString();
    }
    else if (WebAuthenticationResult.ResponseStatus == WebAuthenticationStatus.ErrorHttp)
    {
    this.tbToken.Text = "HTTP Error returned by AuthenticateAsync() : " + WebAuthenticationResult.ResponseErrorDetail.ToString();
    }
    else
    {
    this.tbToken.Text = "Error returned by AuthenticateAsync() : " + WebAuthenticationResult.ResponseStatus.ToString();
    }

  • 相关阅读:
    vue 安装scss
    element-ui 弹出添加拖拽功能
    百度网盘SVIP不限速Mac破解版(亲测可用)
    cookie,localStorage和sessionStorage
    ES6中class的实现原理
    闭包的使用场景
    HTTPS原理以及流程
    DOMContentLoaded和load的区别
    js中的函数防抖与节流
    对vuex的理解
  • 原文地址:https://www.cnblogs.com/wujiakun/p/Fcebook.html
Copyright © 2011-2022 走看看