我試圖做一個共享鏈接的Windows 8應用程序...Windows 8的Facebook Feed對話框應用程序
我已經有一個訪問令牌。 如何打開Feed對話框?
我使用如下因素代碼:
var facebookURL =
"https://www.facebook.com/dialog/feed" +
"?display=popup" +
"&app_id=" + FBI.appID +
"&access_token=" + FBI.auth.getAccessToken() +
"&link=http://apps.microsoft.com/windows/app/archery-master/172c7273-10a8-4519-8a66-68ec4dae12f1" +
"&picture=http://wscont1.apps.microsoft.com/winstore/1x/0a119429-8795-4e0b-9f1a-d55bb5e8c2b1/Icon.70730.png" +
"&name=Archery%20Master" +
"&caption=I%20have%20a%20new%20best%20score" +
"&description=My%20best%20score%20was%20300%20points" +
"&redirect_uri=" + FBI.auth.callbackURL;
var startURI = new Windows.Foundation.Uri(facebookURL);
var endURI = new Windows.Foundation.Uri(FBI.auth.callbackURL);
Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAsync(
Windows.Security.Authentication.Web.WebAuthenticationOptions.dafault, startURI, endURI)
.done(function (result) {
switch (result.responseStatus) {
case Windows.Security.Authentication.Web.WebAuthenticationStatus.errorHttp:
break;
case Windows.Security.Authentication.Web.WebAuthenticationStatus.success:
break;
default:
break;
}
}, function (err) {
});
但是,我有如下因素的錯誤:
API Error Code: 110
API Error Description: Invalid user id
Error Message: Missing user cookie (to validate session user)
建議嗎?
謝謝你的回答,但即時通訊已經使用Facebook的分數API作爲我的後端,所以,我需要用戶身份驗證分享他的分數和下載朋友的分數。如果我使用共享源合同,我將擁有兩個不同的用戶界面...我將在魅力欄中設置此共享源合同,但是我想要的是與Facebook更連接的體驗。通過Share Sorce合同,我無法設置我在facebook對話框中的所有Facebook參數... –
您是否正在從MSDN上的WebAuthenticationBroker示例(http://code.msdn.microsoft.com/windowsapps/Web-Authentication -d0485122)?以上哪些代碼導致了您所看到的錯誤? – devhammer
示例只是獲取AccessToken,它工作正常。我想要的是打開另一個窗口(登錄後),如登錄窗口打開提要對話框。當我打開這個新窗口(使用提要對話框地址)窗口內的頁面顯示此錯誤(Facebook發送此錯誤)。我認爲對話窗口不處理會話/ cookies,即時通訊尋找一種方法來做到這一點 –