2015-09-07 13 views
0

我已经启用了SSO,它是工作的罚款与谁已经在Yammer的注册用户,但它给出了用户错误谁尚未注册Yammer的 :::怎么听SSO错误: ::用于SSO如何验证用户的Yammer网络中存在

 if (yamNetwork != null) { 

      $.getScript("https://c64.assets-yammer.com/assets/platform_embed.js", function() { 


       // Load Yammer Comment control 
       yam.connect.embedFeed({ 
        container: "#yammerComment", 
        network: "org.com", 
        feedType: "open-graph", 
        objectProperties: { 
         type: "page", 
         title: document.title.toString() 
        }, 
        config: { 
         use_sso: true, 
         header: false, 
         footer: false, 
         promptText: "Comment on this page", 
         defaultToCanonical: true 
        } 
       }); 
      } 
        ); 





     } 

但无法

吹代码收到任何回应

回答

0

使用下面的代码,你可以在Yammer的用户进行身份验证。对于成功的身份验证,您将获得“authenticationResponse”。

string authorizeCode = Request.Params.Get("code"); 
    var yammerClientID = your client id; 
    var yammerClientSecret = your client secret; 
    string authenticateUrl = String.Format("https://www.yammer.com/oauth2/access_token.json?client_id={0}&client_secret={1}&code={2}", yammerClientID, yammerClientSecret, authorizeCode); 
    try 
    { 
    authenticationResponse = cli.DownloadString(authenticateUrl); 
    } 
    catch 
    { 
    //Code           
    } 

如果这样不能解决您的问题,请在此处分享您的代码。

+0

我已经更新了我的问题,所以它的代码Request.Params.Get方法 –

+0

请参阅这篇文章完整规范要求: http://www.codeproject.com/Articles/838663/Building-an-OAuth-Yammer -APP-与-ASP-NET-MVC和 – Rupesh

相关问题