|
|
Facebook Stream Publish
This control is used to publish stories on user profile, friends' profiles or the Facebook page. The example shows how easily you can publish a story on a user profile. Stream
publish has 4 possible media types for publish: image, video, flash and MP3. The control also has possibility to set JavaScript code which will be executed and form id which
will be submitted after story is successfully published. For this example shown PHP code used for making a story with image media type.
For all details about the control, with descriptions of all optional properties and ways of how to configure all 4 media types, please visit
Facebook Stream Publish Tutorial.
Facebook session is not established. Please login by pressing login button:
// create instance of stream publich cotrols
$publish = new StreamPublish();
// Optional: set story name
$publish->SetName("Story Name");
// Optional: set caption
$publish->SetCaption("{*actor*} publish this story:");
// Optional: set description
$publish->SetDescription("This is a description of the story");
// Optional: set css class of publish button
$publish->SetCssClass("facebookbutton");
// Optional: set video as media
$publish->SetMedia(new ImageMedia("http://images.vatlab.net/cat.png", "http://vatlab.com"));
// Optional: display popup
$publish->SetDisplayPopup(true);
// Optional: add property
$publish->AddPropery(new Property("Product Name", "Faceconn Toolkit"));
$publish->AddPropery(new LinkedProperty("Product Demo", "Faceconn Toolkit Demo", "http://faceconn.com/demo/"));
// Optional: add action link
$publish->AddActionLink(new ActionLink("Faceconn", "http://faceconn.com"));
// render component on page
$publish->Render();
|