Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Facebook does allow desktop flow authentication, see <a href="https://developers.facebook.com/docs/authentication/" rel="nofollow noreferrer">this documentation</a></p> <p>You need to specify a special return_uri if using a chrome extension. <code>https://www.facebook.com/connect/login_success.html</code>)</p> <p>You also need to add <code>tabs</code>and the URL to your manifest permissions - i.e.:</p> <pre><code>"permissions": [ "tabs", "https://facebook.com/connect/*" ] </code></pre> <p>When a user clicks the login/auth button, you need to perform two steps:</p> <h3>Step 1</h3> <p>Redirect the user to the OAUTH page:</p> <pre><code>chrome.tabs.create( { 'url': "https://www.facebook.com/dialog/oauth?client_id=client_id&gt;&amp;redirect_uri=https://www.facebook.com/connect/login_success.html" }, null); </code></pre> <h3>Step 2</h3> <p>Add a listener to Tab updates that searches all tabs for the success URL:</p> <pre><code>chrome.tabs.onUpdated.addListener(function() { var lis = this; chrome.tabs.getAllInWindow(null, function(tabs) { for (var i = 0; i &lt; tabs.length; i++) { if (tabs[i].url.indexOf("https://www.facebook.com/connect/login_success.html") == 0) { var token = tabs[i].url.match(/[\\?&amp;#]auth_token=([^&amp;#])*/i) chrome.tabs.onUpdated.removeListener(lis); return; } } }); }); </code></pre> <p>Note that I've got a <a href="https://stackoverflow.com/questions/8378733/chrome-extension-facebook-oauth-with-manually-retrieved-access-token">related question</a> on using the <em>provided</em> javascript api for desktop flow, as I've always received the same API error (191)</p>
    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