2015-09-07 56 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

相關問題