Facebook::Graph::Publish::Post - Publish to a user's wall.


version 0.0700


 my $fb = Facebook::Graph->new;

    ->set_message('I like beer.')

 my $response = $fb->add_post
    ->set_message('I like Perl.')
    ->set_link_caption('Perl is a programming language.')
    ->set_link_description('A link to the Perl web site.')


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.


to ( id )

Specify a profile id to post to. Defaults to 'me', which is the currently logged in user.

set_message ( message )

Sets the text to post to the wall.


A string of text.

set_picture_uri ( uri )

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.


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.

publish ( )

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 ( and is licensed under the same terms as Perl itself.