c# - Facebook integration "error occurred try again later"? -


i'm trying connect app facebook. created app on facebook , code:

private void checkauthorization()         {             string app_id = "appid";             string app_secret = "appsecret";             string scope = "publish_stream,manage_pages";              if (request["code"] == null)             {                 response.redirect(string.format(                     "https://graph.facebook.com/oauth/authorize?client_id={0}&redirect_uri={1}&scope={2}",                     app_id, request.url.absoluteuri, scope));             }             else             {                 dictionary<string, string> tokens = new dictionary<string, string>();                  string url = string.format("https://graph.facebook.com/oauth/access_token?client_id={0}&redirect_uri={1}&scope={2}&code={3}&client_secret={4}",                     app_id, request.url.absoluteuri, scope, request["code"].tostring(), app_secret);                  httpwebrequest request = webrequest.create(url) httpwebrequest;                  using (httpwebresponse response = request.getresponse() httpwebresponse)                 {                     streamreader reader = new streamreader(response.getresponsestream());                      string vals = reader.readtoend();                      foreach (string token in vals.split('&'))                     {                         //meh.aspx?token1=steve&token2=jake&...                         tokens.add(token.substring(0, token.indexof("=")),                             token.substring(token.indexof("=") + 1, token.length - token.indexof("=") - 1));                     }                 }                  string access_token = tokens["access_token"];                  var client = new facebookclient(access_token);                  client.post("/me/feed", new { message = "markhagan.me video tutorial" });             }         } 

when page loads login pop shown. when login email of user created facebook app everithing works perfect. every other different login results in message "error occurred try again later". can tell me m making mistake?

make sure application sandbox mode set "off"


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -