Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What is your project type : <strong>WinForms</strong> , <strong>WPF</strong> , <strong>ASP.NET</strong> ?</p> <p>if you are working with <strong>WinForms</strong> or <strong>WPF</strong> , you have to get the <code>access_token</code> form the <code>Browser Control</code> URL by requesting the OAuth Login Dialog and the <code>return_type=token</code> , then extract the valid <code>access_token</code> from the URL.</p> <p>Otherwise , if you are working on Web Application using <strong>ASP.NET</strong> , you will have to redirect the user to the OAuth Dialog Login Page then the facebook will redirect you back with a code on the URL , you get this code from the <code>QueryString</code> and make an <code>HTTPRequest</code> to the Facebook to get the valid <code>access_token</code> .</p> <p>you can use my method for doing that :</p> <pre><code> public string GetAccessTokenFromCode(string AppID, string AppSecret, string RedirectURL, string Code) { WebClient wc = new WebClient(); string u2 = "https://graph.facebook.com/oauth/access_token?client_id=" + AppID + "&amp;redirect_uri=" + RedirectURL + "&amp;client_secret=" + AppSecret + "&amp;code=" + Code + "&amp;state=anytexthere"; string access = wc.DownloadString(u2); access = access.Substring(access.IndexOf("access_token") + 13); if (access.Contains("&amp;")) { string accesstoken = access.Substring(0, access.IndexOf("&amp;")); return accesstoken; } return access; } </code></pre> <p>and you can call it from the <code>Page_Load</code> : </p> <pre><code>if (Request.QueryString["code"] != null) { code = Request.QueryString["code"].ToString(); string AT = GetAccessTokenFromCode(AppID, AppSecret, RedirectUrl, Code); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload