在PhoneGap应用程序中安装facebook connect插件

时间:2016-06-15 13:03:29

标签: facebook cordova phonegap-plugins

我有一个PhoneGap应用,我正在尝试安装Facebook connect plugin,因此我可以在其上设置Facebook登录按钮,但我没有设法做到这一点。< / p>

我在herehere以及很多其他网站上看了好几天。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

使用此

https://github.com/ccoenraets/OpenFB

易于设置和设置指南非常简单直接。

这里是完整的详细教程

http://kmturley.blogspot.in/2014/10/facebook-login-inside-hybrid-app-using.html

基本语法是

require_once('/var/www/folder/includes/vendor/autoload.php');

$loader = new Twig_Loader_Filesystem(array('/var/www/templates/utilities/test'));
$twig = new Twig_Environment($loader, array(
    'cache' => '/var/www/templates/cached',
    'auto_reload' => true, // set to false to improve performance (Note: You have to clear the cache manually whenever a template is changed)
    'debug' => true,
    'use_strict_variables' => false,
));
$twig->addExtension(new Twig_Extension_Debug());



$swiftMailerTemplateHelper = new \WMC\SwiftmailerTwigBundle\TwigSwiftHelper($twig, '/var/www/templates/utilities/test');
// I'm not exactly sure what the value for the second parameter is supposed to be.
//The instructions referenced just list a variable called $web_directory.
//I'm assuming they just mean a path to where the templates are stored.

echo "hello world";