Facebook::Graph::Publish::Post - Publish to a user's wall.
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.
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
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.
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.
A text string.
Posts the data and returns a Facebook::Graph::Response object. The response object should contain the id:
Facebook::Graph is Copyright 2010 Plain Black Corporation (http://www.plainblack.com) and is licensed under the same terms as Perl itself.