我把facebook api代码放在我的视图中,但它没有显示结果

时间:2016-04-25 06:33:26

标签: codeigniter

<?php 

$fb = new Facebook\Facebook([
  'app_id' => '1784359588500732', // Replace {app-id} with your app id
  'app_secret' => '30138893272d147c8388759e4da8951a',
  'default_graph_version' => 'v2.2',
]);


$helper = $fb->getRedirectLoginHelper();


$permissions = ['sabat989@gmail.com']; // Optional permissions
$loginUrl = $helper->getLoginUrl('http://dev.solidbrandworks.com/swatchmumbai/fb-callback.php', $permissions);

echo '<a href="' . htmlspecialchars($loginUrl) . '">Log in with Facebook!</a>';

?>

0 个答案:

没有答案