Ignore:
Timestamp:
Jan 12, 2013, 1:43:13 PM (10 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
e3a0d71, 4485285
Parents:
4626016
git-author:
Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
git-committer:
Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
Message:
Remove trailing whitespace

This commit was made with the command sequence

    for i in $(git ls-files | tr '\n' ' ');
    do
      echo $i; sed -i s'/\s\+$//g' "$(readlink -f $i)";
    done
Location:
perl/modules/Facebook/lib/Facebook
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Facebook/lib/Facebook/Graph.pm

    r5ef98c7 r7869e48  
    8787}
    8888
    89 sub authorize { 
     89sub authorize {
    9090    my ($self) = @_;
    9191    return Facebook::Graph::Authorize->new(
     
    302302 my $sarah_bownds = $fb->fetch('sarahbownds');
    303303 my $perl_page = $fb->fetch('16665510298');
    304  
     304
    305305Or better yet:
    306306
     
    311311    ->request
    312312    ->as_hashref;
    313    
     313
    314314 my $sarahs_picture_uri = $fb->picture('sarahbownds')->get_large->uri_as_string;
    315315
     
    319319    ->request('https://graph.facebook.com/btaylor')
    320320    ->as_hashref;
    321  
    322  
     321
     322
    323323=head2 Building A Privileged App
    324324
     
    342342 my $q = Plack::Request->new($env);
    343343 $fb->request_access_token($q->query_param('code'));
    344  
     344
    345345Or if you already had the access token:
    346346
    347347 $fb->access_token($token);
    348  
     348
    349349Get some info:
    350350
     
    419419
    420420 my $sarah = $fb->fetch('sarahbownds');
    421  
     421
    422422 my $sarah = $fb->query->find('sarahbownds')->request->as_hashref;
    423423
  • perl/modules/Facebook/lib/Facebook/Graph/Cookbook/Recipe1.pod

    r2a42248 r7869e48  
    6464
    6565 my $urlmap = Plack::App::URLMap->new;
    66  
     66
    6767 # your code will go here
    6868
    6969 $urlmap->to_app;
    7070
    71 All the code we have you add should go in the C<# your code will go here> block, in the order that we have you add it. 
    72  
     71All the code we have you add should go in the C<# your code will go here> block, in the order that we have you add it.
     72
    7373=head2 Step 6: Create your Facebook::Graph object.
    7474
     
    8080    secret      => 'Put Your Application Secret Here',
    8181 );
    82  
     82
    8383Now you need the URL you entered in step 3, and the application ID and secret you got in step 4.
    8484
     
    186186
    187187 sudo plackup --port 80 app.psgi
    188  
     188
    189189Now we point our browser to:
    190190
    191191 http://www.yourapplication.com/facebook
    192  
     192
    193193Voila! You have created an authenticated Facebook app. If you would like to see this full program check out C<eg/recipe1.psgi> inside this distribution of L<Facebook::Graph>.
    194194
     
    196196=head1 CAVEATS
    197197
    198 You should never design an application using all the poor stuff we've done here, like using a shared L<Facebook::Graph> object, not using a Framework/CMS or at least L<Plack::Builder>, not using a templating system, passing the offline access token through the URL, etc. We've made comments about these things as we did them to warn you. These choices were made here B<only> because this is example code who's primary purpose is to show you how to use L<Facebook::Graph>, and not best practices for web development. 
     198You should never design an application using all the poor stuff we've done here, like using a shared L<Facebook::Graph> object, not using a Framework/CMS or at least L<Plack::Builder>, not using a templating system, passing the offline access token through the URL, etc. We've made comments about these things as we did them to warn you. These choices were made here B<only> because this is example code who's primary purpose is to show you how to use L<Facebook::Graph>, and not best practices for web development.
    199199
    200200=head1 SEE ALSO
  • perl/modules/Facebook/lib/Facebook/Graph/Cookbook/Recipe2.pod

    r2a42248 r7869e48  
    1515You'll need to have all of the following modules installed in order to run this app (in addition to L<Facebook::Graph>):
    1616
    17 L<DateTime::Format::ICal> L<Dancer> L<Template> L<Data::ICal> L<XML::FeedPP> 
     17L<DateTime::Format::ICal> L<Dancer> L<Template> L<Data::ICal> L<XML::FeedPP>
    1818
    1919=head2 Assumptions
     
    6565 mkdir -p /opt/webapp
    6666 cp -Rfp Facebook-Graph/eg/recipe2/* /opt/webapp
    67  
     67
    6868=head2 Step 6: Configure your app.
    6969
     
    7373 vi config.yml
    7474
    75 Specifically we need to set the C<app_id> and C<secret> fields with information from our Facebook application settings page. And we need to update the C<postback> with the domain pointing to our server. 
     75Specifically we need to set the C<app_id> and C<secret> fields with information from our Facebook application settings page. And we need to update the C<postback> with the domain pointing to our server.
    7676
    7777=head2 Step 7: Start it.
  • perl/modules/Facebook/lib/Facebook/Graph/Picture.pm

    r2a42248 r7869e48  
    6363
    6464 my $fb = Facebook::Graph->new;
    65  
     65
    6666 my $default_picture =  $fb->picture('16665510298')->uri_as_string;
    6767 my $large_picture = $fb->picture('16665510298')->get_large->uri_as_string;
  • perl/modules/Facebook/lib/Facebook/Graph/Publish.pm

    rfe03126 r7869e48  
    7777=head1 DESCRIPTION
    7878
    79 This module shouldn't be used by you directly for any purpose. 
     79This module shouldn't be used by you directly for any purpose.
    8080
    8181=head1 LEGAL
  • perl/modules/Facebook/lib/Facebook/Graph/Publish/Event.pm

    r2a42248 r7869e48  
    183183
    184184 {"id":"1647395831_130068550371568"}
    185  
    186  
     185
     186
    187187=head1 TODO
    188188
  • perl/modules/Facebook/lib/Facebook/Graph/Publish/Post.pm

    r2a42248 r7869e48  
    381381=head2 set_privacy ( setting, options )
    382382
    383 A completely optional privacy setting. 
     383A completely optional privacy setting.
    384384
    385385=head2 set_properties ( properties )
     
    425425
    426426 $post->set_target_countries( ['US'] );
    427  
     427
    428428=head3 countries
    429429
     
    436436
    437437 $post->set_target_regions( [6,53] );
    438  
     438
    439439=head3 regions
    440440
     
    448448
    449449 $post->set_target_cities( [2547804] );
    450  
     450
    451451=head3 cities
    452452
     
    460460
    461461 $post->set_target_locales( [6] );
    462  
     462
    463463=head3 locales
    464464
  • perl/modules/Facebook/lib/Facebook/Graph/Query.pm

    rb7fa912 r7869e48  
    7979    my ($self, $limit) = @_;
    8080    $self->limit($limit);
    81     return $self;   
     81    return $self;
    8282}
    8383
     
    109109    my ($self, $offset) = @_;
    110110    $self->offset($offset);
    111     return $self;   
     111    return $self;
    112112}
    113113
     
    215215
    216216 my $fb = Facebook::Graph->new;
    217  
     217
    218218 my $perl_page = $fb->find('16665510298')
    219219    ->include_metadata
    220220    ->request
    221221    ->as_hashref;
    222  
     222
    223223 my $sarah_bownds = $fb->find('sarahbownds')
    224224    ->select_fields(qw(id name))
     
    254254    ->request
    255255    ->as_hashref;
    256    
     256
    257257The above query, if you were read it like text, says: "Give me the user ids and full names of all users named Dave that have been created since yesterday, and limit the result set to the first 25."
    258258
     
    314314=head2 search ( query, context )
    315315
    316 Perform a keyword search on a group of items. 
     316Perform a keyword search on a group of items.
    317317
    318318If you prefer not to search by keyword see the C<from> method.
  • perl/modules/Facebook/lib/Facebook/Graph/Role/Uri.pm

    r2a42248 r7869e48  
    2424=head1 DESCRIPTION
    2525
    26 Provides a C<uri> method in any class which returns a L<URI> object that points to the Facebook Graph API. 
     26Provides a C<uri> method in any class which returns a L<URI> object that points to the Facebook Graph API.
    2727
    2828=head1 LEGAL
Note: See TracChangeset for help on using the changeset viewer.