NAME

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

VERSION

version 0.0700

SYNOPSIS

 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;

DESCRIPTION

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.

METHODS

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.

message

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.

uri

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.

uri

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.

name

A text string to be used as the name of the link.

Sets a short blurb to be displayed below the link/picture.

caption

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.

description

A text string.

publish ( )

Posts the data and returns a Facebook::Graph::Response object. The response object should contain the id:

 {"id":"1647395831_130068550371568"}

LEGAL

Facebook::Graph is Copyright 2010 Plain Black Corporation (http://www.plainblack.com) and is licensed under the same terms as Perl itself.