Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following code is implemented in for asp.net page using C# code.</p> <p><strong>EXPLANATION</strong></p> <p>First you need to send a request to authenticate the user(the IF part). You will get a "CODE" on successfull authentication. Then send a request with this code to authorize the application. On successful authorization you will get the access token as response.</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["code"] != null) { Response.Redirect("https://graph.facebook.com/oauth/access_token?client_id=CLIENT_ID&amp;redirect_uri=CURRENT_URL&amp;client_secret=APP_SECRET&amp;code="+Request.QueryString["code"]); } else { Response.Redirect("https://www.facebook.com/dialog/oauth?client_id=CLIENT_ID&amp;redirect_uri=CURRENT_URL&amp;scope=read_stream"); } } </code></pre> <p><strong>HERE IS THE PROCEDURE</strong></p> <ol> <li>Create an asp.net website</li> <li>In the <strong>default.aspx</strong> page implement the above code.</li> <li>Replace <strong>CLIENT_ID,APP_SECRET</strong> with the <strong>AppId</strong> and <strong>AppSecret</strong> respectively</li> <li><strong>CURRENT_URL</strong> should be the url of the page in which you are implementing the code.</li> <li>The part "<strong>&amp;scope=read_stream</strong>" is not mandatory. If you need any additional permissions please enter it here as comma separated values.</li> </ol> <p>You will get a string in the format</p> <p><strong>access_token=ACCESS_TOKEN_VALUE&amp;expires=EXPIRY_TIME</strong></p> <p>as response.</p> <hr> <p>Try this to send a POST request using flex</p> <pre><code>var urlLoader:URLLoader = new URLLoader(); var request:URLRequest = new URLRequest("https://www.facebook.com/logout.php?next=YOUR_URL&amp;access_token=ACCESS_TOKEN"); request.data = binaryData; request.method = URLRequestMethod.POST urlLoader.load(request); </code></pre>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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