Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adds example and yaml placeholder

  • Loading branch information...
commit 1c20a66962f88e9fc7525d7e1ef72ab2f39b99aa 1 parent 5ac02a3
@spazm authored
Showing with 42 additions and 0 deletions.
  1. +14 −0 examples/facebook.yml
  2. +28 −0 examples/show_group_information.pl
View
14 examples/facebook.yml
@@ -0,0 +1,14 @@
+---
+app_id:
+permissions:
+- email
+- offline_access
+- publish_stream
+- publish_actions
+- create_event
+- rsvp_event
+- manage_pages
+- user_groups
+- friends_location
+postback: http://localhost:8123/
+secret:
View
28 examples/show_group_information.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+#ABSTRACT: Example Demonstrating Facebook::Graph::Cmdline life cycle
+
+# show_group_information.pl:
+# Demonstrates Facebook::Graph::Cmdline life cycle
+#
+# Initializes Facebook::Graph::Cmdline from a yaml
+# configfile(facebook.yml), creates and saves an
+# access token, requests and prints information
+# about a group (LA Perl Mongers)
+
+use warnings;
+use strict;
+
+use Data::Dumper;
+use Facebook::Graph::Cmdline;
+my $fb = Facebook::Graph::Cmdline->new_with_config(
+ configfile => 'facebook.yml' );
+
+unless ( $fb->verify_token() )
+{
+ my $token = $fb->token();
+ $fb->save_token();
+}
+
+my $lapm_group_id = '119158178096277';
+print Dumper $fb->fetch($lapm_group_id);
Please sign in to comment.
Something went wrong with that request. Please try again.