c# - Parse Facebook login_success URL -


after authenticate facebook i'm getting url:

  http://www.facebook.com/connect/login_success.html  #access_token=161713100507627|2.r8bxagr9wdiqywjgvx_ypg__.3600.1301475600-100001169602345|sy- fl-62kcsgcn1pgiv2fyslthe  &expires_in=5996 

how can parse url , access token?

i tried request["access_token"] it's not working: cant after #.

the code genrate url

 string[] extendedpermissions = new[] { "publish_stream", "offline_access" };          var oauth = new facebookoauthclient { appid = current.appid, redirecturi = urlli };           appid = current.appid;         var parameters = new dictionary<string, object>                     {                         { "response_type", "token" },                         { "display", "popup" }                      };             if (extendedpermissions != null && extendedpermissions.length > 0)         {             var scope = new stringbuilder();             scope.append(string.join(",", extendedpermissions));             parameters["scope"] = scope.tostring();         }          var loginurl = oauth.getloginurl(parameters); 

ok, think have enough info able answer somewhat. i'm guessing using silverlight out of browser (since platform know of returns this).

what have set page on same site silverlight out of browser app installed (you have no choice must this). reason not notified of after hashtag. page scriptnotify silverlight app passing in full url javascript (it include hashtag content -- "#access_token=..." stuff).

you need set in facebook application (i think can in call in setup in code well) point page. in silverlight have handle "scriptnotify" event. see here sample web page, , here sample silverlight code

one more thing, please mark me answer if have correctly guessed (and solved) problem.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -