mirror of
https://github.com/e107inc/e107.git
synced 2025-10-09 20:18:08 +02:00
25 lines
461 B
PHP
25 lines
461 B
PHP
<?php
|
|
|
|
if (!defined('e107_INIT')) { exit; }
|
|
|
|
class facebook_shortcodes extends e_shortcode
|
|
{
|
|
|
|
function sc_fb($parm='')
|
|
{
|
|
$fbPref = e107::getPlugPref('facebook');
|
|
$perms = "email";
|
|
|
|
if($parm == 'login')
|
|
{
|
|
$link = "https://www.facebook.com/dialog/oauth?client_id={$fbPref['appId']}
|
|
&redirect_uri=".e_SELF."&scope={$perms}&response_type=token";
|
|
|
|
return "<a href='{$link}'>Login with Facebook</a>";
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
?>
|