<ahref="http://facebook.com"class="urlextern"title="http://facebook.com"rel="nofollow">Facebook</a> is a famous social network service. Facebook uses <ahref="http://en.wikipedia.org/wiki/OAuth2"class="urlextern"title="http://en.wikipedia.org/wiki/OAuth2"rel="nofollow">OAuth2</a> protocol to allow applications to reuse its own authentication process (it means, if your are connected to Facebook, other applications can trust Facebook and let you in).
</p>
<p>
You need <ahref="https://metacpan.org/release/Net-Facebook-Oauth2"class="urlextern"title="https://metacpan.org/release/Net-Facebook-Oauth2"rel="nofollow">Net::Facebook::Oauth2</a> package.
</p>
<p>
You need to register a new application on Facebook to get an application ID and a secret. See <ahref="https://developers.facebook.com/apps"class="urlextern"title="https://developers.facebook.com/apps"rel="nofollow">https://developers.facebook.com/apps</a> on how to do that.
In Manager, go in <code>General Parameters</code>><code>Authentication modules</code> and choose Facebook for authentication module. You can also use Facebook as user database.
</p>
<p>
Then, go in <code>Facebook parameters</code>:
</p>
<ul>
<liclass="level1"><divclass="li"><strong>Authentication level</strong>: authentication level for this module.</div>
</li>
<liclass="level1"><divclass="li"><strong>Facebook application ID</strong>: the application ID you get</div>
</li>
<liclass="level1"><divclass="li"><strong>Facebook application secret</strong>: the corresponding secret</div>
</li>
</ul>
<p>
If you use Facebook as user database, declare values in exported variables :
<liclass="level1"><divclass="li"> use any key name you want. If you want to refuse access when a data is missing, just add a “!” before the key name</div>
<liclass="level1"><divclass="li"> in the value field, set the field name. You can show them using <ahref="https://developers.facebook.com/tools/explorer"class="urlextern"title="https://developers.facebook.com/tools/explorer"rel="nofollow">Facebook Graph API explorer</a></div>
See also <ahref="../../documentation/2.0/exportedvars.html"class="wikilink1"title="documentation:2.0:exportedvars">exported variables configuration</a>.
<p><divclass="notetip">You can use the same Facebook access token in your applications. It is stored in session datas under the name <strong>$_facebookToken</strong>