Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #9 from wwphp-fb/feature/gistify
Browse files Browse the repository at this point in the history
Feature/gistify
  • Loading branch information
petk committed Dec 29, 2014
2 parents 6363ea6 + 243d289 commit 97ffdd2
Show file tree
Hide file tree
Showing 22 changed files with 1,139 additions and 261 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ parameters.yml
/phpunit.xml
/logs/*
!logs/.gitkeep
*.sublime*
*.sublime*
/sandbox/
11 changes: 8 additions & 3 deletions bin/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@
try {
$email = $yaml['facebookbot']['email'];
$password = $yaml['facebookbot']['password'];

$appId = $yaml['facebookbot']['app_id'];
$appSecret = $yaml['facebookbot']['app_secret'];
$accessToken = $yaml['facebookbot']['access_token'];

$groupId = $yaml['facebookbot']['group_id'];
$debug = $yaml['facebookbot']['debug'];

$connectionParameters = new ConnectionParameters($email, $password, $groupId);
$connectionParameters = new ConnectionParameters($email, $password, $appId, $appSecret, $accessToken, $groupId);

$bot = new Bot($connectionParameters);
$bot->getModuleManager()->loadModule('MemberRequest');
$bot->getModuleManager()->loadModule('NewPost');
} catch (\Exception $e) {
// Some error occurred
echo $e->getMessage();
}

}
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
"name": "wwphp-fb/facebook-bot",
"description": "Facebook bot written in PHP",
"description": "Facebook group managing bot written in PHP",
"license": "MIT",
"keywords": ["facebook-bot"],
"authors": [
{
"name": "Peter Kokot",
"email": "peterkokot@gmail.com"
"email": "peterkokot@gmail.com",
"role": "Lead Developer"
},
{
"name": "Dennis Degryse",
"email": "dennisdegryse@gmail.com",
"homepage": "http://dennisdegryse.be",
"role": "Developer"
}
],
"require": {
"facebook/php-sdk-v4" : "4.0.*",
"symfony/yaml": "~2.5",
"monolog/monolog": "~1.11"
},
Expand Down
Loading

0 comments on commit 97ffdd2

Please # to comment.