我已經在Sitecore 7.2上安裝社交連接模塊2.1,然後我配置了配置文件映射,Facebook應用程序,一切進展順利。Sitecore 7.2社交連接模塊2.1 authResult =錯誤
當我嘗試使用「登錄與Facebook」渲染登錄,我得到重定向到同一頁面錯誤的查詢字符串:
http://sc72rev151021.com/registration?authResult=error_9ffsede-dsdf6-4f50-9b6a-asdasdasd
我檢查日誌文件,我看到這個錯誤:
28144 10:24:36 ERROR The error in ConnectManager occured Exception: Sitecore.Social.Infrastructure.Exceptions.SocialException Message: The given key was not present in the dictionary.
Nested Exception
Exception: System.Collections.Generic.KeyNotFoundException Message: The given key was not present in the dictionary. Source: mscorlib
at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Sitecore.Social.Facebook.Networks.Providers.FacebookProvider.GetAccountBasicData(Account account) at Sitecore.Social.Client.Api.ConnectorClientManager.Connect(Account account, Boolean attachAccountToLoggedInUser, Boolean isAsyncProfileUpdate) at Sitecore.Social.Client.Api.Connector.ConnectorAuthCompleted.AuthCompleted(AuthCompletedArgs args)
然後我重新編譯的DLL,代碼在這裏崩潰(從下面的代碼片段Sitecore.Social.Facebook.dll):
public AccountBasicData GetAccountBasicData(Account account)
{
Assert.IsNotNull(account, "Account parameter is null");
IDictionary<string, object> accountData = this.GetAccountData(account, "/me");
if (accountData == null)
{
return null;
}
string str = string.Concat(accountData["first_name"], " ", accountData["last_name"]);
AccountBasicData accountBasicDatum = new AccountBasicData()
{
Account = account,
Id = accountData["id"] as string,
Email = accountData["email"] as string,
FullName = str
};
return accountBasicDatum;
}
private IDictionary<string, object> GetAccountData(Account account, string access)
{
return this.FacebookRequest(account, access, null, (FacebookClient facebookClient, string feedPath, object inputParams) => facebookClient.Get(feedPath) as IDictionary<string, object>);
}
任何想法?該模塊是否依賴於不推薦的Facebook密鑰?
謝謝
你能提供Facebook頁面的URL上,你只是想登錄後重定向?我想它會傳遞過時的權限範圍。 – Anton
謝謝安東的幫助,第一件事是用戶在這個頁面http://sc72rev151021.com/registration然後他試圖登錄使用Facebook渲染,然後他將重定向到相同的頁面http://sc72rev151021.com/註冊?authResult = error_9ffsede-dsdf6-4f50-9b6a-asdasdasd –
在你提到的兩頁之間應該有一個到Facebook的中間請求。在瀏覽器中使用Fiddler或開發人員工具的網絡面板來獲取它。 – Anton