Facebook::Graph::Publish::Post - Publish to a user's wall.
version 0.0700
my $fb = Facebook::Graph->new; $fb->add_post ->set_message('I like beer.') ->publish; my $response = $fb->add_post ->set_message('I like Perl.') ->set_picture_uri('http://www.perl.org/i/camel_head.png') ->set_link_uri('http://www.perl.org/') ->set_link_name('Perl.org') ->set_link_caption('Perl is a programming language.') ->set_link_description('A link to the Perl web site.') ->publish;
This module gives you quick and easy access to publish to a user's Facebook feed.
ATTENTION: You must have the publish_stream privilege to use this module.
publish_stream
TIP: Facebook seems to use these terms interchangibly: Feed, Post, News, Wall. So if you want to publish to a user's wall, this is the mechanism you use to do that.
Specify a profile id to post to. Defaults to 'me', which is the currently logged in user.
Sets the text to post to the wall.
A string of text.
Sets the URI of a picture to be displayed in the message.
BUG: I'm doing everything according to Facebook's API as far as I can tell, yet pictures don't seem to get attached to posts. Not sure why. Email me if you know.
A URI to a picture.
Sets the URI of a link that viewers can click on for more information about whatever you posted in set_message.
set_message
A URI to a site.
If you want to give the link you set in set_link_uri a human friendly name, use this method.
set_link_uri
A text string to be used as the name of the link.
Sets a short blurb to be displayed below the link/picture.
A text string.
Sets a longer description of the site you're linking to. Can also be a portion of the article you're linking to.
Posts the data and returns a Facebook::Graph::Response object. The response object should contain the id:
{"id":"1647395831_130068550371568"}
Facebook::Graph is Copyright 2010 Plain Black Corporation (http://www.plainblack.com) and is licensed under the same terms as Perl itself.
To install Facebook::Graph, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Facebook::Graph
CPAN shell
perl -MCPAN -e shell install Facebook::Graph
For more information on module installation, please visit the detailed CPAN module installation guide.