首先,請原諒我,因爲我說英語像一頭法國牛!Facebook c#sdk Fork:Version5 oAuth
這就是它,我決定下車Facebook工具包,並開始使用Facebook的c#sdk。
我看着v4.2.1。然後我閱讀「http://facebooksdk.codeplex.com/Thread/View.aspx?ThreadId=241181」,我下載了v5源代碼。
我對這個V5的auth過程有點問題。 這裏是我的代碼:
string _requiredAppPermissions = "offline_access,email";
FacebookApp fbApp = new FacebookApp();
var fbSettings = new FacebookSettings();
fbSettings.AppId = RWE.Core.Config.FacebookApp;
fbSettings.AppSecret = RWE.Core.Config.FacebookSecret;
Authorizer authorizer = new Authorizer(fbSettings);
//Authorizer authorizer = new Authorizer();
if (!String.IsNullOrEmpty(_requiredAppPermissions)) authorizer.Perms = _requiredAppPermissions;
authorizer.Perms = _requiredAppPermissions;
authorizer.ReturnUrlPath = _AuthUrlReturn;
authorizer.Authorize();
var me = fbApp.Api("me");
所以,如果我從URL加載應用程序:「http://apps.facebook.com/myapp」,它顯示了Facebook的標誌(法語)「Accéderà Facebook「(這意味着」訪問Facebook「)。該鏈接是一種「http://www.facebook.com/connect/uiserver.php?app_id=170580299646394 & method = permissions.request & display = page & next = http%3A%2F%2Fwww.facebook.com% 2Fconnect%2Flogin_success.html & response_type = code & fbconnect = 1 & perms = offline_access%2Cemail「 如果我從」http://realurl.com「加載應用程序,它會直接顯示授權表單,就像它應該在facebookapp中一樣網址。
我的問題是:
我怎麼能有權威性的形式直接顯示(不Facebook商標步驟)?
雖然我指定了ReturnUrlPath,但facebook仍然使用facebook.com/connect/login_success.html,並將我導向到facebook.com,而不是回到應用程序。我怎樣才能改變它?
驗證不在鏈接中。 – Netah 2011-01-31 20:56:28