1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-09 20:18:08 +02:00
Files
php-e107/e107_plugins/facebook/e_shortcode.php
2012-05-31 09:46:39 +00:00

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>";
}
}
}
?>